/* vAvtobyse 2.8.3 DESKTOP LAYOUT 1V */
:root{
  --blue-0:#f9fdff;--blue-1:#edf7fd;--blue-2:#d9ecf8;--blue-3:#bdd9eb;
  --blue-4:#8bb6d3;--blue-5:#5b93bb;--blue-6:#3978a6;--blue-7:#245a82;
  --line:#8baec6;--text:#17384f;--muted:#658093;--green:#6bb51a;
  --panel:#f8fcff;--shadow:0 10px 32px rgba(31,67,92,.25);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Tahoma,Verdana,Arial,sans-serif;font-size:13px;color:var(--text)}
body{background:radial-gradient(circle at 12% 8%,rgba(255,255,255,.88),transparent 28%),linear-gradient(145deg,#c3deef,#eef8fd 55%,#b6d3e7);overflow:hidden}
button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer}.hidden{display:none!important}
.screen{min-height:100vh}.center-screen{display:grid;place-items:center;padding:18px}.center-text{text-align:center}.padded{padding:20px}
.qip-window{border:1px solid #527f9f;border-radius:8px 8px 5px 5px;background:var(--panel);box-shadow:var(--shadow);overflow:hidden}
.small-window{width:min(330px,100%)}.login-window{width:min(470px,100%)}
.titlebar{height:34px;display:flex;align-items:center;gap:8px;padding:0 9px;color:#fff;font-weight:bold;text-shadow:0 1px #214963;background:linear-gradient(#75b2d8,#356f9b);border-bottom:1px solid #245b83;user-select:none}
.qip-logo{width:28px;height:22px;font-size:10px;border-radius:6px;display:inline-grid;place-items:center;background:linear-gradient(#c5f270,#6bac13);border:1px solid rgba(255,255,255,.85);box-shadow:inset 0 0 0 1px rgba(39,96,3,.35);color:#204400;text-shadow:none;font-weight:bold}
h1{font-size:21px;margin:0 0 8px}h2{font-size:18px;margin:8px 0}p{line-height:1.48}.big-icon{font-size:45px}.small-muted{font-size:11px;color:var(--muted)}
.field-label{display:block;font-weight:bold;font-size:12px;margin:12px 0 5px}.qip-input{width:100%;padding:9px 10px;border:1px solid #8eafc5;border-radius:3px;background:#fff;box-shadow:inset 0 1px 2px rgba(0,0,0,.08);outline:none}.qip-input:focus{border-color:#367fae;box-shadow:0 0 0 2px rgba(64,137,187,.15)}
.primary,.secondary,.send-button{border-radius:3px;padding:8px 13px;font-weight:bold;box-shadow:inset 0 1px rgba(255,255,255,.9)}
.primary{border:1px solid #4d790d;background:linear-gradient(#c2ef75,#7db91e);color:#1a3b03}.primary:hover{background:linear-gradient(#d2f58e,#8bc72b)}
.secondary{border:1px solid #7298b3;background:linear-gradient(#fff,#dcebf5)}.secondary:hover{background:linear-gradient(#fff,#edf7fd)}
.wide{width:100%;margin-top:13px}.notice{margin-top:14px;padding:10px;border:1px solid #b5cfdf;border-radius:4px;background:#eef8fd;color:#526e80;font-size:12px;line-height:1.45}.invite-badge{margin-top:12px;padding:9px;border:1px solid #a8c982;background:#eff9df;color:#426b12;border-radius:3px}
.spinner{width:34px;height:34px;margin:7px auto;border:4px solid #cfdfeb;border-top-color:#4f8eb8;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.app{height:100vh;display:grid;grid-template-columns:310px 1fr;gap:8px;padding:8px}.contacts-window,.chat-window{min-width:0;min-height:0;display:flex;flex-direction:column}.app-titlebar{flex:0 0 34px}.title-spacer{flex:1}.title-button{border:1px solid rgba(255,255,255,.45);border-radius:3px;background:rgba(255,255,255,.16);color:#fff;width:25px;height:23px}.title-button:hover{background:rgba(255,255,255,.3)}
.toolbar{height:34px;display:flex;align-items:center;gap:3px;padding:4px 6px;border-bottom:1px solid #9fbed3;background:linear-gradient(#fff,#dceaf4)}.tool-button{width:28px;height:25px;border:1px solid transparent;border-radius:3px;background:transparent;display:grid;place-items:center}.tool-button:hover{border-color:#8db1ca;background:#f3fbff}
.profile-card{display:grid;grid-template-columns:50px 1fr;gap:10px;align-items:center;padding:10px;border-bottom:1px solid #b1c9d9;background:#f2faff}.profile-main{min-width:0}.profile-name{font-weight:bold;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.online-line{font-size:11px;color:#5a8e18;margin-top:3px}.id-line{font-size:11px;color:#526f82;margin-top:4px}
.avatar{display:grid;place-items:center;overflow:hidden;border:1px solid #7f9fb5;border-radius:5px;background:linear-gradient(135deg,#ffe47f,#ef8b31);box-shadow:inset 0 0 0 2px rgba(255,255,255,.8);flex:0 0 auto}.avatar img{width:100%;height:100%;object-fit:cover}.avatar-large{width:48px;height:48px;font-size:25px}.avatar-xl{width:72px;height:72px;font-size:36px}
.id-search-box{padding:9px;border-bottom:1px solid #b7ccd9;background:#fbfdff}.id-search-box label{display:block;font-weight:bold;font-size:11px;margin-bottom:5px}.inline-control{display:grid;grid-template-columns:1fr auto;gap:5px}.search-result{margin-top:7px;padding:7px;border:1px solid #a7c2d5;border-radius:3px;background:#edf7fd}.search-profile{display:grid;grid-template-columns:35px 1fr auto;gap:7px;align-items:center}.search-profile .avatar{width:34px;height:34px;font-size:17px}.search-name{font-weight:bold}.search-id{font-size:10px;color:var(--muted)}
.list-heading{padding:6px 8px;font-weight:bold;border-bottom:1px dotted #b5c8d6;background:#eaf5fb}.conversation-list{flex:1;min-height:0;overflow:auto;padding:5px}.conversation-item{display:grid;grid-template-columns:38px 1fr;gap:7px;align-items:center;padding:7px 6px;border-radius:3px;cursor:pointer}.conversation-item:hover,.conversation-item.selected{background:#dceff9;outline:1px solid #a4c8df}.conversation-item .avatar{width:36px;height:36px;font-size:19px}.conversation-main{min-width:0}.conversation-title{font-weight:bold;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conversation-preview{margin-top:3px;font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.empty-list{padding:20px 10px;text-align:center;color:var(--muted)}
.statusbar{height:29px;display:flex;align-items:center;justify-content:space-between;padding:0 7px;border-top:1px solid #a6c1d4;background:linear-gradient(#edf7fd,#cfdfeb);font-size:11px}.empty-chat{flex:1;display:grid;place-content:center;text-align:center;padding:25px;color:#587184}.empty-chat p{max-width:550px}.privacy-text{padding:10px;border:1px solid #bad0df;background:#edf7fc;border-radius:4px;color:#31566e}
.active-chat{flex:1;min-height:0;display:flex;flex-direction:column}.chat-header{display:grid;grid-template-columns:50px 1fr auto;gap:10px;align-items:center;padding:9px 12px;border-bottom:1px solid #9ebbd0;background:linear-gradient(90deg,#eaf6fd,#fbfeff)}.chat-header-main{min-width:0}.chat-title{font-size:15px;font-weight:bold;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-subtitle{font-size:11px;color:var(--muted);margin-top:4px}
.message-list{flex:1;min-height:0;overflow:auto;padding:13px 16px;background:linear-gradient(rgba(255,255,255,.93),rgba(246,251,254,.96)),repeating-linear-gradient(0deg,transparent,transparent 20px,rgba(92,144,181,.05) 21px)}.message-row{display:grid;grid-template-columns:34px 1fr;gap:8px;margin-bottom:13px}.message-row .avatar{width:32px;height:32px;font-size:17px}.message-meta{font-size:11px;margin-bottom:4px}.message-author{font-weight:bold;color:#286496}.message-time{color:#8497a5;margin-left:6px}.message-bubble{display:inline-block;max-width:min(760px,92%);padding:7px 9px;border:1px solid #bed1df;border-radius:3px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.05);line-height:1.43;overflow-wrap:anywhere}.message-row.mine .message-bubble{background:#eef9dd;border-color:#bdd39a}.message-text{white-space:pre-wrap}.retro-emote{width:34px;height:34px;vertical-align:middle;margin:0 2px;filter:drop-shadow(0 1px 1px rgba(70,45,0,.24));transform-origin:50% 75%;animation:emote-pop .18s ease-out}.retro-emote:hover{animation:emote-wiggle .45s ease-in-out}@keyframes emote-pop{from{transform:scale(.72);opacity:.45}to{transform:scale(1);opacity:1}}@keyframes emote-wiggle{0%,100%{transform:rotate(0)}25%{transform:rotate(-8deg) scale(1.07)}75%{transform:rotate(8deg) scale(1.07)}}.file-card{margin-top:7px;padding:7px;border:1px solid #bed2df;background:#f2f9fd;border-radius:3px;display:flex;align-items:center;gap:8px;text-decoration:none;color:inherit}.file-card:hover{background:#e7f4fc}.file-icon{font-size:25px}.file-name{font-weight:bold;font-size:11px}.file-size{font-size:10px;color:var(--muted);margin-top:2px}.image-message{display:block;max-width:min(360px,100%);max-height:300px;margin-top:7px;border-radius:4px;border:1px solid #a9bfce;cursor:pointer}.message-day{text-align:center;color:#7b909e;font-size:11px;margin:4px 0 14px}.loading-messages{text-align:center;color:var(--muted);padding:20px}
.composer{position:relative;border-top:1px solid #9dbbd1;background:#eef6fb}.composer-toolbar{min-height:32px;padding:3px 7px;display:flex;align-items:center;gap:4px;border-bottom:1px solid #bed2e0;background:linear-gradient(#fff,#e1edf5)}.composer-tip{margin-left:auto;font-size:10px;color:var(--muted)}.composer-row{display:grid;grid-template-columns:1fr auto;gap:7px;padding:7px}.composer textarea{min-height:77px;max-height:180px;resize:vertical;padding:8px;border:1px solid #88a8bf;background:#fff;outline:none;border-radius:2px}.send-button{min-width:108px;border:1px solid #60900d;background:linear-gradient(#c4ef75,#78b21b);color:#1d3b05}.send-button:disabled,.primary:disabled{opacity:.55;cursor:not-allowed}
.emoji-panel{position:absolute;left:8px;bottom:120px;width:410px;max-width:calc(100vw - 30px);max-height:286px;overflow:auto;padding:8px;border:1px solid #6e92ac;border-radius:4px;background:linear-gradient(#fff,#eef7fc);box-shadow:0 7px 22px rgba(0,0,0,.25);display:grid;grid-template-columns:repeat(8,1fr);gap:4px;z-index:10}.emoji-choice{height:43px;border:1px solid #c4d7e4;background:linear-gradient(#fff,#eaf4fa);border-radius:4px;display:grid;place-items:center;padding:2px}.emoji-choice .emoji-sprite{width:36px;height:36px;transition:transform .15s}.emoji-choice:hover{border-color:#6599bd;background:#dff1fb}.emoji-choice:hover img{transform:scale(1.17) rotate(-4deg)}.pending-file{margin:7px 7px 0;padding:7px 9px;border:1px solid #b8cfdd;background:#fff;border-radius:3px;display:flex;align-items:center;justify-content:space-between;gap:8px}.pending-file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.remove-file{border:0;background:transparent;font-size:17px}
.modal-backdrop{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:15px;background:rgba(17,44,61,.4)}.modal{width:min(470px,100%);max-height:90vh;overflow:auto}.modal-actions{display:flex;justify-content:flex-end;gap:7px;padding:10px;border-top:1px solid #bed1df;background:#edf5fa}.avatar-editor{display:flex;align-items:center;gap:14px}.invite-output{margin-top:12px}.copy-box{padding:10px;border:1px solid #a8c2d4;background:#fff;border-radius:3px;word-break:break-all;font:12px Consolas,monospace}.members-list{min-height:100px}.member-row{display:grid;grid-template-columns:38px 1fr;gap:8px;align-items:center;padding:7px;border-bottom:1px dotted #bdd0dd}.member-row .avatar{width:36px;height:36px;font-size:18px}.member-name{font-weight:bold}.member-id{font-size:10px;color:var(--muted)}
.toast{position:fixed;right:16px;top:16px;bottom:auto;z-index:100;max-width:min(420px,calc(100vw - 32px));padding:11px 14px;border-radius:4px;color:#fff;background:#244f6c;box-shadow:0 6px 18px rgba(0,0,0,.25);line-height:1.35}.toast.error{background:#8b352a}.toast.below-connection{top:68px}
@media(max-width:820px){body{overflow:auto}.app{height:auto;min-height:100vh;grid-template-columns:1fr;padding:0;gap:0}.qip-window{border-radius:0;border-left:0;border-right:0}.contacts-window{height:44vh;min-height:340px}.chat-window{height:56vh;min-height:510px}.titlebar{position:relative}.message-list{padding:10px}.composer-tip{display:none}.send-button{min-width:82px}.chat-header{grid-template-columns:45px 1fr auto;padding:7px}.chat-header .avatar-large{width:42px;height:42px}.chat-header .secondary{padding:7px}.message-bubble{max-width:98%}}
@media(max-width:480px){.contacts-window{height:46vh}.chat-window{height:54vh}.id-search-box{padding:7px}.profile-card{padding:7px}.composer-row{grid-template-columns:1fr}.send-button{min-height:39px}.emoji-panel{grid-template-columns:repeat(6,1fr);bottom:165px;width:360px}.modal-backdrop{padding:0}.modal{height:100%;max-height:none}}

.message-content{min-width:0;position:relative}.message-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:22px}.message-meta-main{min-width:0}.message-edited{margin-left:6px;color:#8497a5;font-style:italic}.message-actions{position:relative;flex:0 0 auto}.message-menu-toggle{width:24px;height:21px;padding:0;border:1px solid transparent;border-radius:3px;background:transparent;color:#5c7688;font-weight:bold;line-height:16px}.message-menu-toggle:hover,.message-menu-toggle:focus{border-color:#9bb9ce;background:#edf7fd}.message-menu{position:absolute;right:0;top:23px;z-index:20;display:none;min-width:150px;padding:4px;border:1px solid #7397b1;border-radius:4px;background:#fff;box-shadow:0 5px 15px rgba(25,56,78,.22)}.message-menu.open{display:grid}.message-menu button{border:0;background:transparent;text-align:left;padding:7px 8px;border-radius:3px;white-space:nowrap}.message-menu button:hover{background:#e4f2fa}.message-menu .danger-action{color:#9b2f25}.message-row:not(.mine) .message-actions{display:none}.deleted-message{color:#728895;font-style:italic;background:#f4f7f9!important;border-style:dashed!important}.message-row.deleted .avatar{filter:grayscale(.65);opacity:.7}.message-edit-input{width:100%;min-height:140px;max-height:50vh;resize:vertical;padding:9px 10px;border:1px solid #8eafc5;border-radius:3px;background:#fff;box-shadow:inset 0 1px 2px rgba(0,0,0,.08);outline:none}.message-edit-input:focus{border-color:#367fae;box-shadow:0 0 0 2px rgba(64,137,187,.15)}
@media(hover:hover){.message-row.mine .message-menu-toggle{opacity:.2}.message-row.mine:hover .message-menu-toggle,.message-menu-toggle:focus,.message-menu.open~.message-menu-toggle{opacity:1}}
@media(max-width:820px){.message-menu-toggle{opacity:1}.message-menu{right:0}}

/* vAvtobyse 1.4 */
.message-actions-direct{display:flex!important;align-items:center;gap:3px;opacity:1!important}
.message-action-button{width:25px;height:22px;padding:0;border:1px solid #9ab7cb;border-radius:3px;background:linear-gradient(#fff,#e1eef6);color:#315f7d;font-weight:bold;line-height:18px;box-shadow:inset 0 1px #fff}
.message-action-button:hover,.message-action-button:focus{background:#d9eef9;border-color:#6f9fbe;outline:none}
.message-action-button.danger-action{color:#a12d25}
.message-row:not(.mine) .message-actions-direct{display:none!important}
.pending-file{position:relative;display:flex;align-items:center;gap:8px;max-width:420px}
.pending-image-preview{display:block;max-width:180px;max-height:120px;border:1px solid #94b2c7;border-radius:4px;object-fit:contain;background:#fff}
.pending-file .remove-file{align-self:flex-start}
.image-message{display:block;max-width:min(560px,100%);max-height:65vh;object-fit:contain;border-radius:4px;cursor:zoom-in}
.version-mark{font-size:10px;opacity:.75;margin-left:5px}
@media(max-width:820px){.message-action-button{width:29px;height:25px}.message-meta{align-items:flex-start}.image-message{max-height:55vh}}

/* vAvtobyse 1.5 — контекстное меню и долгое нажатие */
.message-row.has-message-actions .message-bubble,
.message-row.has-message-actions .image-message{
  -webkit-touch-callout:none;
}
.message-row.has-message-actions .message-bubble{
  touch-action:pan-y;
}
.message-row.has-message-actions .image-message{
  touch-action:pan-y;
  -webkit-user-drag:none;
}
.message-context-menu{
  position:fixed;
  z-index:1000;
  display:grid;
  min-width:178px;
  padding:5px;
  border:1px solid #6f96b2;
  border-radius:5px;
  background:#fff;
  box-shadow:0 8px 24px rgba(24,55,76,.28);
}
.message-context-menu.hidden{display:none}
.message-context-menu button{
  border:0;
  border-radius:3px;
  padding:9px 11px;
  background:transparent;
  color:#173448;
  text-align:left;
  white-space:nowrap;
}
.message-context-menu button:hover,
.message-context-menu button:focus{
  outline:0;
  background:#e4f2fa;
}
.message-context-menu .danger-action{color:#a02d24}
@media(max-width:820px){
  .message-context-menu{min-width:205px;font-size:14px}
  .message-context-menu button{padding:12px 13px}
}

/* vAvtobyse 1.6 — ответы, реакции, непрочитанные и уведомления */
.notification-tool{position:relative}.notification-dot{position:absolute;right:1px;top:1px;width:7px;height:7px;border-radius:50%;background:#e84a3b;border:1px solid #fff}.conversation-item{grid-template-columns:38px 1fr auto}.unread-badge{min-width:20px;height:20px;padding:0 6px;border-radius:10px;display:grid;place-items:center;background:#73b51d;color:#fff;font-size:10px;font-weight:bold;border:1px solid #4f8410;box-shadow:inset 0 1px rgba(255,255,255,.45)}
.reply-preview{margin:7px 7px 0;padding:7px 9px;border:1px solid #9fbed3;border-left:4px solid #4f8eb8;background:#fff;border-radius:3px;display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.reply-preview-main{min-width:0}.reply-preview-title{font-weight:bold;font-size:11px;color:#2b6c99}.reply-preview-text{font-size:11px;color:#5c7587;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}.reply-preview-close{border:0;background:transparent;font-size:17px}
.message-reply-quote{display:block;margin-bottom:7px;padding:6px 8px;border-left:3px solid #5f9dc7;background:rgba(224,241,251,.75);border-radius:2px;cursor:pointer}.message-reply-author{font-size:10px;font-weight:bold;color:#286496}.message-reply-text{font-size:10px;color:#61798a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:420px}.forwarded-label{font-size:10px;color:#5b7890;font-style:italic;margin-bottom:5px}.message-reactions{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}.reaction-chip{border:1px solid #b6cddd;border-radius:11px;background:#f4faff;padding:2px 7px;font-size:11px;line-height:16px}.reaction-chip.mine{border-color:#73a7c9;background:#dff1fb}.reaction-chip:hover{background:#e4f2fa}.context-reaction-bar{display:grid;grid-template-columns:repeat(6,1fr);gap:2px;padding:4px;border-bottom:1px solid #d6e3ec;margin-bottom:3px}.context-reaction-bar button{padding:7px 4px!important;text-align:center!important;font-size:17px}.message-context-menu .hidden-action{display:none!important}
.forward-preview{padding:9px;border:1px solid #b4cddd;background:#eef7fd;border-radius:3px;color:#4e6a7d;max-height:120px;overflow:auto}.forward-conversation-list{display:grid;gap:5px;max-height:260px;overflow:auto}.forward-chat-button{display:grid;grid-template-columns:34px 1fr;gap:7px;align-items:center;width:100%;padding:7px;border:1px solid #a9c3d5;border-radius:3px;background:linear-gradient(#fff,#e9f4fa);text-align:left}.forward-chat-button:hover{background:#dff1fb}.forward-chat-button .avatar{width:32px;height:32px}.forward-chat-title{font-weight:bold}.forward-chat-sub{font-size:10px;color:var(--muted);margin-top:2px}
.notification-status-good{border-color:#9fc57b;background:#eff9df;color:#436b17}.notification-status-warn{border-color:#d6b56d;background:#fff8dd;color:#775b19}
@media(max-width:820px){.context-reaction-bar button{font-size:19px}.message-reply-text{max-width:240px}.forward-conversation-list{max-height:45vh}}
.message-highlight .message-bubble{outline:2px solid #6ea6ca;outline-offset:2px}

/* v1.7 — управление звуками */
.sound-modal .padded {
  max-height: min(72vh, 720px);
  overflow-y: auto;
}
.sound-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #b9cfdd;
}
.sound-section-title {
  margin-bottom: 8px;
  font-weight: bold;
  color: #315f7d;
}
.sound-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 7px 0;
}
.sound-check input {
  margin: 0;
}
.sound-volume {
  width: 100%;
  margin: 2px 0 9px;
}
.sound-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.sound-test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.sound-test-grid button {
  min-width: 0;
}
.sound-import-mapping {
  display: grid;
  gap: 6px;
  margin: 8px 0;
}
.sound-import-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(150px, 1.2fr);
  gap: 7px;
  align-items: center;
  padding: 6px;
  border: 1px solid #b8cfdf;
  border-radius: 3px;
  background: #f7fbfe;
}
.sound-import-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.sound-import-select {
  min-width: 0;
}
@media (max-width: 560px) {
  .sound-test-grid { grid-template-columns: 1fr; }
  .sound-import-row { grid-template-columns: 1fr; }
  .sound-import-name { white-space: normal; overflow-wrap: anywhere; }
}

/* vAvtobyse 1.8 — мобильный интерфейс, выбор сообщений и сетевой шлюз */
.connection-banner{position:fixed;left:50%;top:8px;transform:translateX(-50%);z-index:1200;padding:8px 12px;border:1px solid #a34e3f;border-radius:4px;background:#fff0e9;color:#7e2f25;box-shadow:0 4px 14px rgba(0,0,0,.18);font-size:12px}
.mobile-account-button,.mobile-back-button{display:none}
.otp-input{text-align:center;font-size:23px;letter-spacing:.35em;font-weight:bold}
.account-summary{display:grid;grid-template-columns:76px 1fr;gap:14px;align-items:center;margin-bottom:16px}
.account-id{margin-top:7px;font-size:13px}
.account-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:14px}
.danger-text{color:#972e25}
.selection-bar{display:flex;align-items:center;gap:8px;padding:7px 10px;border-bottom:1px solid #8fb0c7;background:linear-gradient(#fdfefe,#dcecf6)}
.selection-close{width:31px;height:31px;border:1px solid #8eabc0;border-radius:50%;background:#fff}
.message-row.selection-active{cursor:pointer}
.message-row.selected-message .message-content{outline:2px solid #4d93bf;outline-offset:3px;border-radius:5px}
.message-row.selected-message::before{content:'✓';position:absolute;z-index:2;width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:#4d93bf;color:white;font-weight:bold;transform:translate(-6px,-7px)}
.message-row{position:relative}
.mobile-account-button{border:0;background:transparent;padding:0;margin-right:2px}
.mobile-account-button .avatar{width:28px;height:28px;font-size:15px;border-color:rgba(255,255,255,.75)}
.mobile-back-button{width:36px;height:36px;padding:0;border:0;background:transparent;color:#245a82;font-size:35px;line-height:30px}

@media(max-width:820px){
  html,body{height:100%;overflow:hidden}
  body{background:#eef6fb}
  .app{position:relative;display:block;height:100dvh;min-height:0;padding:0;overflow:hidden}
  .contacts-window,.chat-window{height:100dvh;min-height:0;border:0;border-radius:0;box-shadow:none}
  .chat-window{display:none}
  .app.mobile-chat-open .contacts-window{display:none}
  .app.mobile-chat-open .chat-window{display:flex}
  .contacts-window>.titlebar{height:56px;flex:0 0 56px;padding:0 12px;font-size:16px}
  .contacts-window>.titlebar>.qip-logo{display:none}
  .mobile-account-button{display:grid;place-items:center}
  .mobile-account-button .avatar{width:38px;height:38px;font-size:20px}
  .contacts-window .toolbar,.contacts-window .profile-card,.contacts-window .id-search-box{display:none}
  .list-heading{padding:9px 12px;font-size:12px}
  .conversation-list{padding:0;background:#fff}
  .conversation-item{grid-template-columns:52px 1fr auto;gap:10px;padding:10px 12px;border-bottom:1px solid #e3edf3;border-radius:0;min-height:70px}
  .conversation-item:hover,.conversation-item.selected{outline:0;background:#edf7fc}
  .conversation-item .avatar{width:50px;height:50px;font-size:24px;border-radius:50%}
  .conversation-title{font-size:14px}
  .conversation-preview{font-size:12px;margin-top:6px}
  .statusbar{padding-bottom:env(safe-area-inset-bottom);height:calc(30px + env(safe-area-inset-bottom))}
  .chat-window>.titlebar{display:none}
  .active-chat{height:100dvh}
  .chat-header{position:relative;z-index:5;grid-template-columns:38px 42px 1fr auto;gap:7px;padding:calc(6px + env(safe-area-inset-top)) 8px 7px;min-height:calc(58px + env(safe-area-inset-top));background:#f7fbfe}
  .mobile-back-button{display:block}
  .chat-header .avatar-large{width:40px;height:40px;border-radius:50%}
  .chat-header .secondary{font-size:0;width:34px;height:34px;padding:0;border-radius:50%}
  .chat-header .secondary::after{content:'ⓘ';font-size:20px}
  .message-list{padding:10px 9px;background:#eef5f8}
  .message-row{grid-template-columns:30px 1fr;gap:6px;margin-bottom:10px}
  .message-row .avatar{width:28px;height:28px;border-radius:50%}
  .message-bubble{max-width:96%;border-radius:12px;padding:8px 10px}
  .message-row.mine .message-bubble{border-bottom-right-radius:3px}
  .message-row:not(.mine) .message-bubble{border-bottom-left-radius:3px}
  .composer{padding-bottom:env(safe-area-inset-bottom)}
  .composer-toolbar{min-height:36px}
  .composer-row{grid-template-columns:1fr auto;padding:6px}
  .composer textarea{min-height:44px;max-height:120px;border-radius:20px;padding:11px 13px;resize:none}
  .send-button{min-width:46px;width:46px;height:46px;border-radius:50%;padding:0;font-size:0}
  .send-button::after{content:'➤';font-size:20px}
  .emoji-panel{left:4px;bottom:102px;width:calc(100vw - 8px);max-width:none;grid-template-columns:repeat(7,1fr)}
  .selection-bar{position:relative;z-index:6;min-height:48px;padding:7px 9px}
  .selection-bar .primary,.selection-bar .secondary{padding:7px 9px}
  .account-modal .padded{padding:18px}
  .account-actions{grid-template-columns:1fr}
  .modal-backdrop{padding:0}
  .modal{height:100%;max-height:none;border-radius:0;border:0}
  .connection-banner{top:calc(6px + env(safe-area-inset-top));max-width:calc(100vw - 20px)}
}

@media(min-width:821px){
  #myAvatar[role="button"]{cursor:pointer}
  #myAvatar[role="button"]:hover{outline:2px solid #6ea6ca}
}


/* vAvtobyse 1.8b — QIP-статусы и присутствие */
.activity-line{font-size:11px;color:#526f82;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.activity-line{font-size:11px;color:#526f82;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conversation-title-row{display:flex;align-items:center;gap:6px;min-width:0}.conversation-title-row .conversation-title{min-width:0;flex:1}.conversation-presence-line{font-size:10px;color:#5f798a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}.chat-title-line{display:flex;align-items:center;gap:7px;min-width:0}.chat-title-line .chat-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.search-presence,.member-presence{gap:6px;margin-top:4px;font-size:10px;color:#607b8d}.search-presence>span:last-child,.member-presence>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:820px){.conversation-item{min-height:82px}.conversation-presence-line{font-size:11px}.bus-presence{width:27px;height:22px;font-size:15px}.chat-title-line .bus-presence{width:25px;height:20px}.activity-preview{font-size:12px}}

/* vAvtobyse 1.8c — безопасная навигация назад на телефоне */
.modal-titlebar{position:sticky;top:0;z-index:4;padding-left:5px}
.modal-nav-back{
  width:30px;height:28px;display:grid;place-items:center;flex:0 0 auto;
  padding:0;border:1px solid rgba(255,255,255,.48);border-radius:4px;
  background:rgba(255,255,255,.13);color:#fff;font-size:29px;line-height:22px;
  font-weight:normal;text-shadow:0 1px #214963;box-shadow:inset 0 1px rgba(255,255,255,.22)
}
.modal-nav-back:hover,.modal-nav-back:focus{background:rgba(255,255,255,.28);outline:2px solid rgba(255,255,255,.35);outline-offset:1px}
@media(max-width:820px){
  .modal-titlebar{height:48px;font-size:14px;padding-right:12px}
  .modal-nav-back{width:40px;height:38px;font-size:38px;line-height:30px;border-color:rgba(255,255,255,.64)}
  .modal .padded{padding-top:16px}
}

/* vAvtobyse 1.9 — управление группами */
.group-manage-modal{width:min(620px,100%)}
.group-management{display:block}.group-role-card{display:flex;justify-content:space-between;gap:12px;padding:9px 10px;margin-bottom:10px;border:1px solid #abc4d6;border-radius:4px;background:#edf7fd}
.group-description-input{width:100%;min-height:72px;resize:vertical;padding:7px;border:1px solid #9eb8ca;border-radius:3px;font:12px Tahoma,Arial,sans-serif;background:#fff;color:#17364a;box-sizing:border-box}
.group-add-box{margin-top:13px;padding-top:10px;border-top:1px dotted #aac0cf}.group-section-title{margin:13px 0 5px;font-weight:bold;color:#285c7b}
.member-row{grid-template-columns:38px minmax(0,1fr) auto}.member-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px;max-width:250px}.member-actions button{padding:4px 7px;font-size:10px}.member-role{display:inline-block;margin-left:4px;padding:1px 5px;border-radius:8px;background:#dcecf7;color:#285c7b;font-size:9px;font-weight:bold}.member-role.owner{background:#ffe9a8;color:#725600}.member-role.admin{background:#dff2cf;color:#315f1c}
.group-bans-section{margin-top:8px;padding-top:8px;border-top:1px solid #bfd0dc}.group-danger-zone{display:flex;justify-content:space-between;gap:8px;margin-top:15px;padding-top:12px;border-top:1px solid #e4b8b8}.group-danger-zone button{flex:1}.empty-members{padding:10px;color:#6e8797;text-align:center}
@media(max-width:760px){.group-manage-modal{width:100%;max-height:100vh}.member-row{grid-template-columns:38px minmax(0,1fr)}.member-actions{grid-column:1/-1;justify-content:flex-start;max-width:none;padding-left:46px}.group-danger-zone{flex-direction:column}}

.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:10px 0 14px;padding:4px;border:1px solid #afc7d7;border-radius:4px;background:#e8f2f8}
.auth-tab{padding:9px;border:1px solid transparent;border-radius:3px;background:transparent;color:#44687f;font-weight:bold;cursor:pointer}
.auth-tab.active{border-color:#78a6c3;background:#fff;color:#245f87;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.auth-tab:disabled{opacity:.55;cursor:not-allowed}
.password-settings{margin-top:18px;padding-top:14px;border-top:1px solid #bfd2df}
.password-settings h3{margin:0 0 6px;color:#2d688f}
.password-modal{width:min(440px,100%)}
.standalone-password-settings{margin-top:0;padding-top:0;border-top:0}
.standalone-password-settings .wide{margin-top:14px}

.link-button{border:0;background:transparent;color:#236f9d;text-decoration:underline;cursor:pointer;padding:10px 6px;font-weight:600}
.link-button:hover{color:#174d6c}
.link-button:disabled{opacity:.55;cursor:not-allowed}

.login-help{display:grid;gap:8px;margin:10px 0 12px}
.login-help-card{display:grid;gap:4px;padding:10px 11px;border:1px solid #abc7d9;border-radius:6px;background:linear-gradient(#fafdff,#eaf5fb);line-height:1.35}
.login-help-card strong{color:#255f87;font-size:13px}
.login-help-card span{color:#4d6d82;font-size:12px}
.public-link-box{margin:0 0 13px;padding:10px;border:1px solid #8fb5cc;border-radius:6px;background:#f6fbfe}
.public-link-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center}
.public-link-input{min-width:0;font-size:12px}
.copy-link-button{white-space:nowrap;padding-left:12px;padding-right:12px}
.copy-link-status{margin-top:7px;color:#397f1c;font-weight:bold;text-align:center}
@media(max-width:520px){
  .center-screen{padding:8px}
  .padded{padding:14px}
  .public-link-row{grid-template-columns:1fr}
  .copy-link-button{width:100%}
  .login-help-card{padding:9px}
}


/* =========================================================
   vAvtobyse 2.0 — Windows 98 / QIP 2005 skin
   ========================================================= */
:root{
  --win-face:#c0c0c0;
  --win-light:#ffffff;
  --win-mid:#dfdfdf;
  --win-shadow:#808080;
  --win-dark:#000000;
  --win-navy:#000080;
  --win-teal:#008080;
  --win-green:#00a000;
  --win-yellow:#ffff00;
  --win-red:#d00000;
  --panel:#c0c0c0;
  --text:#000;
  --muted:#444;
  --line:#808080;
  --shadow:none;
}
html,body{
  font-family:"MS Sans Serif",Tahoma,Verdana,Arial,sans-serif;
  font-size:12px;
  color:#000;
}
body{
  background:
    linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px),
    linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
    #008080;
  background-size:4px 4px;
}
.qip-window{
  border:2px solid;
  border-color:var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
  border-radius:0;
  background:var(--win-face);
  box-shadow:1px 1px 0 var(--win-shadow);
}
.titlebar{
  height:25px;
  min-height:25px;
  padding:2px 4px;
  color:#fff;
  background:linear-gradient(90deg,#000080,#1084d0);
  border:0;
  border-bottom:1px solid #000;
  text-shadow:none;
  font-weight:700;
  letter-spacing:.1px;
}
.qip-logo{
  width:22px;height:19px;
  border:1px solid #000;
  border-radius:0;
  background:#c0ff60;
  box-shadow:inset 1px 1px #fff,inset -1px -1px #808080;
  color:#004000;
  font-family:"Courier New",monospace;
}
.padded{padding:12px}
h1{font-size:17px;font-weight:700;margin:0 0 8px}
h2{font-size:15px}
.primary,.secondary,.send-button,.tool-button,.title-button,.auth-tab,.emoji-choice,.message-action-button,.copy-link-button{
  border:2px solid;
  border-color:var(--win-light) var(--win-dark) var(--win-dark) var(--win-light);
  border-radius:0!important;
  background:var(--win-face)!important;
  color:#000!important;
  box-shadow:none!important;
  text-shadow:none!important;
  font-weight:400;
}
.primary:active,.secondary:active,.send-button:active,.tool-button:active,.title-button:active,.auth-tab:active,.emoji-choice:active{
  border-color:var(--win-dark) var(--win-light) var(--win-light) var(--win-dark);
  padding-top:9px;
  padding-left:14px;
}
.primary:focus,.secondary:focus,.auth-tab:focus,.qip-input:focus{
  outline:1px dotted #000;
  outline-offset:-4px;
}
.primary:hover,.secondary:hover,.send-button:hover,.tool-button:hover,.auth-tab:hover{
  background:#d4d0c8!important;
}
.qip-input,textarea,select{
  border:2px solid;
  border-color:var(--win-shadow) var(--win-light) var(--win-light) var(--win-shadow);
  border-radius:0!important;
  background:#fff;
  color:#000;
  box-shadow:inset 1px 1px #000!important;
  padding:6px 7px;
}
.notice,.login-help-card,.public-link-box,.search-result,.profile-card,.id-search-box{
  border:2px solid;
  border-color:var(--win-shadow) var(--win-light) var(--win-light) var(--win-shadow);
  border-radius:0!important;
  background:#fff;
  color:#000;
}
.auth-tabs{
  border:2px solid;
  border-color:var(--win-shadow) var(--win-light) var(--win-light) var(--win-shadow);
  border-radius:0;
  background:#c0c0c0;
  padding:3px;
}
.auth-tab.active{
  background:#fff!important;
  color:#000!important;
  border-color:#000 #fff #fff #000;
}
.link-button{
  color:#000080;
  font-weight:400;
  padding:5px 3px;
}
.link-button:hover{color:#d00000}
.login-window{width:min(500px,100%)}
.login-help-card strong{color:#000080}
.login-help-card span{color:#222}
.auth-small-actions{
  display:flex;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
  margin-top:5px;
}
.compact-button{padding:5px 8px;margin-top:7px}
.retro-system-line{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:24px;
  margin:7px 0 10px;
  padding:4px 7px;
  border:2px solid;
  border-color:#808080 #fff #fff #808080;
  background:#000;
  color:#00ff00;
  font-family:"Courier New",monospace;
  font-size:11px;
}
.retro-led{
  width:9px;height:9px;
  border:1px solid #001b00;
  background:#00e000;
  box-shadow:0 0 5px #00ff00;
}
.retro-system-line[data-tone="busy"]{color:#ffff00}
.retro-system-line[data-tone="busy"] .retro-led{background:#ffff00;box-shadow:0 0 5px #ffff00}
.retro-system-line[data-tone="error"]{color:#ff6060}
.retro-system-line[data-tone="error"] .retro-led{background:#ff0000;box-shadow:0 0 5px #ff0000}
.retro-auth-footer{
  margin:8px 0 3px;
  padding:3px 5px;
  border:1px solid #808080;
  background:#000080;
  color:#fff;
  font-family:"Courier New",monospace;
  font-size:9px;
  text-align:center;
}
.app{gap:3px;padding:3px;background:#008080}
.contacts-window,.chat-window{border-radius:0}
.toolbar,.composer,.selection-bar{
  background:#c0c0c0!important;
  border-color:#808080!important;
}
.profile-card{background:#c0c0c0}
.conversation-list,.message-list{background:#fff!important}
.conversation-item{
  border-radius:0!important;
  border:1px solid transparent;
}
.conversation-item:hover,.conversation-item.selected{
  background:#000080!important;
  color:#fff!important;
  outline:1px dotted #fff;
  outline-offset:-3px;
}
.conversation-item:hover .conversation-preview,
.conversation-item.selected .conversation-preview{color:#fff!important}
.message-bubble{
  border:1px solid #808080;
  border-radius:0;
  background:#fff;
  box-shadow:none;
}
.message-row.mine .message-bubble{
  background:#ffffd8;
  border-color:#808000;
}
.statusbar{
  border-top:2px solid;
  border-color:#808080 #fff #fff #808080;
  background:#c0c0c0;
  color:#000;
}
.modal-backdrop{background:rgba(0,0,0,.48)}
.modal{border-radius:0}
.message-context-menu{
  border:2px solid;
  border-color:#fff #000 #000 #fff;
  border-radius:0;
  background:#c0c0c0;
  box-shadow:2px 2px 0 #000;
}
.message-context-menu button:hover{background:#000080;color:#fff}
.emoji-panel{
  border:2px solid;
  border-color:#fff #000 #000 #fff;
  border-radius:0;
  background:#c0c0c0;
  box-shadow:2px 2px 0 #000;
}
.emoji-choice{
  height:44px;
  padding:2px;
}
.retro-emote,.emoji-choice .emoji-sprite{
  image-rendering:pixelated;
  image-rendering:crisp-edges;
  filter:drop-shadow(1px 1px 0 rgba(0,0,0,.45));
}
.retro-emote{
  width:36px;height:36px;
  animation:qip-pixel-bob 1.6s steps(2,end) infinite;
}
.emoji-choice .emoji-sprite{
  width:36px;height:36px;
  animation:qip-pixel-idle 1.2s steps(2,end) infinite;
}
.emoji-choice:nth-child(3n) img{animation-delay:-.35s}
.emoji-choice:nth-child(4n) img{animation-delay:-.7s}
@keyframes qip-pixel-bob{
  0%,70%,100%{transform:translateY(0) scale(1)}
  75%{transform:translateY(-2px) scale(1.03)}
  85%{transform:translateY(1px) scale(.98)}
}
@keyframes qip-pixel-idle{
  0%,65%,100%{transform:translateY(0)}
  70%{transform:translateY(-2px)}
  78%{transform:translateY(1px)}
}
.spinner{
  border-radius:0;
  border-color:#808080;
  border-top-color:#000080;
  animation:win-spin .6s steps(8,end) infinite;
}
@keyframes win-spin{to{transform:rotate(360deg)}}
.version-mark{
  padding:1px 3px;
  border:1px solid rgba(255,255,255,.75);
  background:#000;
  color:#00ff00;
  font-family:"Courier New",monospace;
  opacity:1;
}
@media(max-width:820px){
  body{background:#008080}
  .contacts-window,.chat-window{border:0!important}
  .contacts-window>.titlebar{height:43px;min-height:43px;background:linear-gradient(90deg,#000080,#1084d0)}
  .conversation-item{border-bottom:1px solid #808080}
  .conversation-item .avatar{border-radius:0}
  .mobile-back-button{color:#000080}
}


/* vAvtobyse 2.1 — крупные и понятные действия */
.action-toolbar{height:auto;min-height:54px;padding:5px;display:grid;grid-template-columns:repeat(7,minmax(54px,1fr));gap:4px}
.action-button{width:auto!important;height:44px!important;min-width:0;padding:3px 5px!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:1px}
.tool-icon{display:grid;place-items:center;width:22px;height:21px;font-size:18px;line-height:1}
.tool-label{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:9px;line-height:11px;white-space:nowrap}
.list-heading{min-height:32px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 8px;font-size:13px;font-weight:700}
.mini-refresh{width:28px;height:24px;padding:0;border:2px solid;border-color:#fff #000 #000 #fff;background:#c0c0c0;font-size:17px}
.conversation-item{cursor:pointer}
.error-empty{color:#800000}
.chat-info-button{min-width:94px;height:34px;padding:4px 8px;display:flex;align-items:center;justify-content:center;gap:5px}
.chat-info-icon{font-size:17px;line-height:1}.chat-info-text{font-size:11px}
.composer-action{width:38px!important;height:34px!important;padding:0!important}
.composer-action>span{display:grid;place-items:center;width:100%;height:100%;font-size:21px;line-height:1}
.send-button{min-width:110px;display:flex;align-items:center;justify-content:center;gap:6px}.send-icon{display:none}
.search-profile{align-items:center}.search-profile .primary{min-width:90px;min-height:34px}

@media(max-width:980px) and (min-width:821px){
  .action-toolbar{grid-template-columns:repeat(4,1fr)}
  .desktop-utility{display:none!important}
}
@media(max-width:820px){
  .contacts-window>.titlebar{height:52px!important;min-height:52px!important}
  .action-toolbar{display:grid!important;position:relative;z-index:4;grid-template-columns:repeat(5,1fr);min-height:67px;padding:5px 5px 4px;border-bottom:2px solid #808080;background:#c0c0c0!important}
  .action-button{display:flex!important;height:56px!important;padding:3px 2px!important}
  .desktop-utility{display:none!important}
  .tool-icon{width:30px;height:30px;font-size:24px}
  .tool-label{font-size:10px;line-height:12px}
  .contacts-window .profile-card,.contacts-window .id-search-box{display:none!important}
  .list-heading{min-height:38px;padding:6px 11px;font-size:15px}
  .conversation-list{flex:1;min-height:0;overflow:auto}
  .conversation-item{min-height:74px!important;grid-template-columns:56px minmax(0,1fr) auto!important;gap:10px!important;padding:9px 10px!important}
  .conversation-item .avatar{width:54px!important;height:54px!important;border-radius:6px!important;font-size:25px!important}
  .conversation-title{font-size:15px!important}
  .conversation-preview{font-size:12px!important;line-height:16px;margin-top:4px}
  .statusbar{min-height:27px;height:auto!important}
  .chat-header{grid-template-columns:44px 46px minmax(0,1fr) 42px!important;gap:6px!important;min-height:64px!important;padding:calc(7px + env(safe-area-inset-top)) 7px 7px!important}
  .mobile-back-button{width:42px!important;height:42px!important;border:2px solid!important;border-color:#fff #000 #000 #fff!important;background:#c0c0c0!important;color:#000080!important;font-size:34px!important}
  .chat-header .avatar-large{width:44px!important;height:44px!important;border-radius:5px!important}
  .chat-title{font-size:15px!important}.chat-subtitle{font-size:10px!important}
  .chat-info-button{width:40px!important;height:40px!important;min-width:40px!important;padding:0!important}
  .chat-info-text{display:none}.chat-info-icon{font-size:23px}
  .message-list{padding:8px 6px!important}
  .message-row{grid-template-columns:26px minmax(0,1fr)!important;gap:5px!important}
  .message-row .avatar{width:25px!important;height:25px!important;border-radius:4px!important}
  .message-bubble{max-width:94%!important;border-radius:3px!important;padding:7px 8px!important}
  .composer{border-top:2px solid #808080!important;background:#c0c0c0!important}
  .composer-toolbar{min-height:44px!important;padding:4px 6px!important}
  .composer-action{width:42px!important;height:38px!important}.composer-action>span{font-size:23px}
  .composer-row{grid-template-columns:minmax(0,1fr) 48px!important;gap:5px!important;padding:5px 6px calc(5px + env(safe-area-inset-bottom))!important}
  .composer textarea{min-height:46px!important;max-height:112px!important;border-radius:2px!important;padding:9px!important;font-size:15px!important}
  .send-button{width:48px!important;height:46px!important;min-width:48px!important;padding:0!important;border-radius:0!important}
  .send-text{display:none}.send-icon{display:block;font-size:23px}.send-button::after{content:none!important}
  .emoji-panel{grid-template-columns:repeat(6,1fr)!important;bottom:100px!important}
  .emoji-choice{min-width:44px;min-height:44px}
  .account-actions{gap:9px!important}.account-actions button{min-height:42px;font-size:13px}
}


/* =========================================================
   vAvtobyse 2.2 — clear messenger UI, Win98/QIP skin
   ========================================================= */
.button-icon,.inline-icon,.sidebar-tab img,.mobile-nav-button img,.mini-refresh img,
.mobile-back-button img,.chat-info-image,.send-icon-image{
  width:24px;height:24px;display:block;pointer-events:none;color:#000;
}
.inline-icon{width:18px;height:18px;margin-right:6px}
.action-button,.mobile-nav-button,.sidebar-tab,.mini-refresh,.conversation-item,
.mobile-back-button,.chat-info-button,.send-button{box-sizing:border-box}
.primary:active,.secondary:active,.send-button:active,.tool-button:active,.title-button:active,
.auth-tab:active,.emoji-choice:active,.action-button:active,.mobile-nav-button:active,
.sidebar-tab:active,.mini-refresh:active{padding:inherit!important;transform:translate(1px,1px)}
.app{grid-template-columns:360px minmax(0,1fr);gap:4px;padding:4px}
.contacts-window>.titlebar{height:44px;min-height:44px;padding:4px 8px;font-size:14px}
.action-toolbar{height:56px;min-height:56px;padding:5px 7px;gap:5px;display:grid;grid-template-columns:repeat(5,1fr)}
.desktop-utility{display:none!important}
.action-button{width:auto!important;height:44px!important;padding:4px 3px!important;display:grid!important;grid-template-rows:24px 11px;place-items:center;gap:1px}
.action-button .button-icon{width:23px;height:23px}
.action-button .button-label{display:block;font-size:9px;line-height:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.profile-card{padding:10px;grid-template-columns:52px 1fr;gap:10px}
.profile-card .avatar-large{width:50px;height:50px;font-size:24px}
.id-search-box{padding:9px}.inline-control{gap:6px}.inline-control .primary{min-height:38px;display:flex;align-items:center;justify-content:center}
.list-heading{min-height:45px;padding:4px;display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:4px;background:#c0c0c0;border-top:2px solid #fff;border-bottom:2px solid #808080}
.sidebar-tabs{display:grid;grid-template-columns:1fr 1fr;gap:3px;min-width:0}
.sidebar-tab{height:35px;min-width:0;padding:3px 7px!important;border:2px solid;border-color:#fff #000 #000 #fff;background:#c0c0c0;color:#000;display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:5px;font:12px Tahoma,Arial,sans-serif;text-align:left}
.sidebar-tab img{width:19px;height:19px}.sidebar-tab b{min-width:20px;padding:1px 4px;background:#fff;border:1px inset #fff;text-align:center;font-size:10px;color:#000;line-height:14px;font-variant-numeric:tabular-nums}
.sidebar-tab.active{background:#000080;color:#fff;border-color:#000 #fff #fff #000;outline:1px dotted #fff;outline-offset:-4px}
.sidebar-tab.active b{color:#000;background:#fff;border-color:#808080 #fff #fff #808080}
.sidebar-tab.active img{filter:invert(1)}
.mini-refresh{width:34px;height:35px;padding:5px!important;border:2px solid;border-color:#fff #000 #000 #fff;background:#c0c0c0;display:grid;place-items:center}
.mini-refresh img{width:21px;height:21px}
.conversation-list{flex:1;min-height:0;overflow:auto;padding:0;background:#fff!important}
.conversation-item{width:100%;min-height:72px;display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:10px;align-items:center;padding:9px 10px;border:0;border-bottom:1px solid #d0d0d0;border-radius:0!important;background:#fff;color:#000;text-align:left;font:inherit;cursor:pointer}
.conversation-item .avatar{width:48px;height:48px;font-size:23px;border-radius:5px!important}
.conversation-item:hover{background:#eef4ff!important;color:#000!important;outline:0}
.conversation-item.selected{background:#000080!important;color:#fff!important;outline:1px dotted #fff;outline-offset:-4px}
.conversation-item.selected .conversation-preview{color:#fff!important}
.conversation-title{font-size:13px}.conversation-preview{font-size:11px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.contact-open-icon{font:28px/1 Tahoma;color:#000080}.conversation-item.selected .contact-open-icon{color:#fff}
.empty-list-action{display:grid;gap:12px;justify-items:center;padding:28px 12px}.empty-new-chat{min-width:130px;min-height:38px}
.chat-header{min-height:68px;padding:9px 12px;grid-template-columns:48px minmax(0,1fr) auto;gap:10px;background:#d4d0c8;border-bottom:2px solid;border-color:#808080 #fff #fff #808080}
.chat-header .avatar-large{width:46px;height:46px;font-size:22px}.chat-title{font-size:15px}.chat-info-button{min-height:40px;min-width:116px;padding:5px 9px;display:flex;align-items:center;justify-content:center;gap:6px}.chat-info-image{width:22px;height:22px}
.message-list{padding:14px 18px}.message-row{grid-template-columns:36px minmax(0,1fr);gap:8px}.message-row .avatar{width:34px;height:34px}.message-bubble{max-width:min(720px,88%);padding:9px 11px;line-height:1.45}
.composer-toolbar{min-height:48px;padding:5px 8px;gap:6px}.composer-toolbar .tool-button{width:40px!important;height:38px!important;padding:6px!important;display:grid!important;place-items:center}.composer-toolbar .button-label{display:none}.composer-toolbar .button-icon{width:25px;height:25px}
.composer-row{grid-template-columns:minmax(0,1fr) auto;gap:7px;padding:7px}.composer textarea{min-height:54px;max-height:150px;resize:none;font-size:14px;padding:10px}.send-button{min-width:122px;min-height:54px;padding:0 16px!important;font-weight:700;display:flex;align-items:center;justify-content:center;gap:7px}.send-icon-image{width:23px;height:23px}
.mobile-bottom-nav{display:none}
.mobile-back-button{padding:0!important;place-items:center}.mobile-back-button img{width:28px;height:28px}.account-actions .secondary{min-height:42px;text-align:left;padding:8px 10px}

@media(max-width:980px) and (min-width:821px){.action-toolbar{grid-template-columns:repeat(5,1fr)}.desktop-utility{display:none!important}}
@media(max-width:820px){
  html,body{height:100%;overflow:hidden;background:#008080}.app{height:100dvh;display:block;padding:0;overflow:hidden}.contacts-window,.chat-window{height:100dvh!important;min-height:0!important}
  .contacts-window{padding-bottom:calc(68px + env(safe-area-inset-bottom))}.contacts-window>.titlebar{height:56px!important;min-height:56px!important;padding:calc(6px + env(safe-area-inset-top)) 10px 6px;font-size:16px}.contacts-window>.titlebar .qip-logo{display:none}
  .contacts-window .action-toolbar,.contacts-window .profile-card,.contacts-window .id-search-box,.contacts-window .statusbar{display:none!important}
  .list-heading{height:48px;min-height:48px;padding:4px;grid-template-columns:minmax(0,1fr) 38px}.sidebar-tab{height:38px;font-size:12px}.mini-refresh{height:38px;width:38px}
  .conversation-list{padding:0;background:#fff}.conversation-item{min-height:80px;grid-template-columns:56px minmax(0,1fr) auto;gap:10px;padding:10px 12px}.conversation-item .avatar{width:54px;height:54px;border-radius:7px!important;font-size:26px}.conversation-title{font-size:15px}.conversation-preview{font-size:12px;margin-top:5px}.conversation-item.selected,.conversation-item:hover{background:#eef4ff!important;color:#000!important;outline:0}.conversation-item.selected .conversation-preview{color:#444!important}.conversation-item.selected .contact-open-icon{color:#000080}
  .mobile-bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:30;height:calc(68px + env(safe-area-inset-bottom));padding:4px 5px env(safe-area-inset-bottom);display:grid;grid-template-columns:repeat(4,1fr);gap:4px;background:#c0c0c0;border-top:2px solid #fff;box-shadow:0 -1px 0 #808080}
  .mobile-nav-button{min-width:0;padding:4px 1px!important;border:2px solid;border-color:#fff #000 #000 #fff;background:#c0c0c0;color:#000;display:grid;justify-items:center;align-content:center;gap:2px;font:10px Tahoma,Arial,sans-serif}.mobile-nav-button img{width:26px;height:26px}.mobile-nav-button.active{background:#000080;color:#fff;border-color:#000 #fff #fff #000}.mobile-nav-button.active img{filter:invert(1)}
  .chat-window>.titlebar{display:none}.active-chat{height:100dvh}.chat-header{min-height:calc(66px + env(safe-area-inset-top));padding:calc(7px + env(safe-area-inset-top)) 7px 7px;grid-template-columns:40px 44px minmax(0,1fr) 42px;gap:6px}.mobile-back-button{display:grid!important;width:40px;height:40px;color:#000}.chat-header .avatar-large{width:42px;height:42px;border-radius:6px!important}.chat-title{font-size:14px}.chat-subtitle{font-size:10px}.chat-info-button{min-width:40px;width:40px;height:40px;padding:0!important}.chat-info-text{display:none}.chat-info-image{width:25px;height:25px}
  .message-list{padding:10px 8px 8px;background:#e7e7e7!important}.message-row{grid-template-columns:30px minmax(0,1fr);gap:6px;margin-bottom:10px}.message-row .avatar{width:28px;height:28px;border-radius:4px!important}.message-bubble{max-width:94%;border-radius:5px!important;padding:8px 10px;font-size:13px}
  .composer{padding-bottom:env(safe-area-inset-bottom);background:#c0c0c0!important}.composer-toolbar{min-height:46px;padding:4px 6px;border-bottom:0}.composer-toolbar .tool-button{display:grid!important;width:40px!important;height:40px!important;padding:7px!important}.composer-tip{display:none}.composer-row{grid-template-columns:minmax(0,1fr) 50px;gap:5px;padding:4px 6px 6px}.composer textarea{min-height:50px;max-height:112px;padding:10px;font-size:15px;border-radius:4px!important}.send-button{min-width:50px;width:50px;height:50px;min-height:50px;padding:0!important;font-size:0}.send-icon-image{width:26px;height:26px}.emoji-panel{bottom:104px;grid-template-columns:repeat(6,1fr)}
  .modal{width:100%;height:100%;max-height:none}.modal-titlebar{height:54px;padding-top:env(safe-area-inset-top)}.account-actions{grid-template-columns:1fr}
}
@media(max-width:390px){.sidebar-tab{padding-left:4px!important;padding-right:4px!important;gap:3px}.sidebar-tab span{font-size:11px}.conversation-item{grid-template-columns:50px minmax(0,1fr) auto;padding:8px}.conversation-item .avatar{width:48px;height:48px}.chat-header{grid-template-columns:36px 40px minmax(0,1fr) 38px;padding-left:4px;padding-right:4px}.chat-info-button{width:38px;min-width:38px}.mobile-nav-button span{font-size:9px}}


/* vAvtobyse 2.3 — composer, search, profiles, camera and voice */
.composer-recipient{display:flex;align-items:center;gap:7px;min-height:36px;padding:5px 8px;background:#e7e7e7;border-bottom:1px solid #808080;color:#111;overflow:hidden}
.recipient-label{font-size:11px;color:#555}.recipient-avatar{width:27px!important;height:27px!important;font-size:14px!important;flex:0 0 auto}.composer-recipient strong{min-width:0;max-width:38%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.recipient-meta{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#555;font-size:10px}
.send-button{visibility:visible!important;opacity:1!important;display:flex!important;flex:0 0 auto!important}.send-button .send-icon-image{display:block!important}.send-button.sending .send-icon-image{animation:send-pulse .65s steps(2,end) infinite}@keyframes send-pulse{50%{transform:translateX(3px)}}
.text-assist-button.assist-off{filter:grayscale(1);opacity:.72}.text-assist-button.assist-off::after{content:'×';position:absolute;color:#b00000;font-size:18px;font-weight:700;right:3px;top:0}.text-assist-button{position:relative}
.voice-recording-bar{display:flex;align-items:center;gap:8px;padding:6px 8px;background:#fff0f0;border:2px inset #fff}.voice-record-dot{width:11px;height:11px;border-radius:50%;background:#e00000;box-shadow:0 0 5px #f00;animation:record-blink 1s steps(2,end) infinite}@keyframes record-blink{50%{opacity:.25}}.voice-timer{font-family:Consolas,monospace;font-size:14px}.voice-recording-bar button{min-height:32px}
#voiceBtn.recording{background:#ffd0d0!important;color:#a00000!important}
.pending-audio-preview,.voice-message{display:grid;grid-template-columns:auto minmax(160px,1fr);gap:6px 8px;align-items:center;width:min(390px,100%)}.pending-audio-preview audio,.voice-message audio{width:100%;min-width:0;height:36px}.pending-audio-preview span:last-child,.voice-message-label{grid-column:2;font-size:10px;color:#555}.voice-file-icon,.voice-message-icon{grid-row:1/3;font-size:28px}.voice-message{padding:7px;border:2px inset #fff;background:#e8eef5}
.new-chat-modal{width:min(680px,96vw)}.new-chat-page{min-height:390px}.new-chat-hero{display:flex;align-items:center;gap:15px;padding:12px;background:#000080;color:#fff;border:2px inset #fff}.new-chat-hero img{width:58px;height:58px;filter:brightness(0) invert(1)}.new-chat-hero h2{margin:0 0 4px}.new-chat-hero p{margin:0}.new-chat-search-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin:14px 0}.new-chat-search-line input{min-height:43px;font-size:15px}.new-chat-search-line button{min-width:112px}.new-chat-result{min-height:100px;padding:9px}.new-chat-help{margin-top:12px;padding:9px;background:#ffffc0;border:2px inset #fff}.search-loading{padding:20px;text-align:center}
.rich-search-profile{display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:12px;align-items:center;padding:11px;margin-bottom:8px;background:#fff;border:2px inset #fff}.search-card-avatar{width:60px!important;height:60px!important;font-size:28px!important;cursor:pointer}.search-login{font-family:Consolas,monospace;color:#000080;font-weight:700}.search-name{font-size:15px;font-weight:700}.search-card-details{margin-top:5px;color:#555;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-card-actions{display:grid;gap:6px}.search-card-actions button{min-width:92px;min-height:36px}
.media-choice-modal{width:min(520px,94vw)}.media-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.media-choice-card{min-height:150px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center}.media-choice-card img{width:52px;height:52px}.media-choice-card strong{font-size:15px}.media-choice-card span{font-size:11px;color:#444}
.user-profile-modal{width:min(610px,96vw)}.public-profile-head{display:grid;grid-template-columns:100px minmax(0,1fr);gap:16px;align-items:center;padding:12px;background:#fff;border:2px inset #fff}.public-profile-login{font:700 13px Consolas,monospace;color:#000080}.public-profile-head h2{margin:3px 0 7px}.profile-questionnaire{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.profile-questionnaire>div{padding:9px;background:#fff;border:2px inset #fff}.profile-questionnaire span{display:block;font-size:10px;color:#555;margin-bottom:4px}.profile-questionnaire p{margin:0;white-space:pre-wrap}.profile-wide{grid-column:1/-1}.profile-textarea{width:100%;min-height:74px;box-sizing:border-box;resize:vertical;border:2px inset #fff;background:#fff;padding:7px;font:12px Tahoma,Arial,sans-serif}
#chatAvatar[role=button],#chatTitle[role=button]{cursor:pointer}#chatTitle[role=button]:hover{text-decoration:underline}
.emoji-panel{max-height:min(58vh,430px);overflow:auto}.emoji-choice{width:52px!important;height:52px!important;padding:3px!important}.emoji-choice .emoji-sprite{width:44px!important;height:44px!important;image-rendering:pixelated}.retro-emote{width:44px!important;height:44px!important;image-rendering:pixelated}
@media(max-width:720px){
 .composer-recipient{min-height:39px;padding:5px 7px}.recipient-label{display:none}.composer-recipient strong{max-width:47%;font-size:12px}.recipient-meta{font-size:9px}
 .composer-toolbar{display:flex!important;overflow-x:auto!important;scrollbar-width:none}.composer-toolbar::-webkit-scrollbar{display:none}.composer-toolbar .tool-button{flex:0 0 43px!important}
 .composer-row{display:grid!important;grid-template-columns:minmax(0,1fr) 54px!important;align-items:end!important}.send-button{display:grid!important;place-items:center!important;width:54px!important;min-width:54px!important;height:52px!important;min-height:52px!important;position:relative!important;z-index:3!important}.send-icon-image{width:29px!important;height:29px!important}.send-text{display:none!important}
 .new-chat-modal,.user-profile-modal,.media-choice-modal{width:100%!important;height:100%!important;max-height:none!important}.new-chat-page{min-height:0}.new-chat-hero{padding:10px}.new-chat-hero img{width:42px;height:42px}.new-chat-search-line{grid-template-columns:1fr 48px}.new-chat-search-line button{min-width:48px;padding:0}.new-chat-search-line button span{display:none}.new-chat-search-line .inline-icon{width:25px;height:25px}
 .rich-search-profile{grid-template-columns:54px minmax(0,1fr);gap:9px}.search-card-avatar{width:52px!important;height:52px!important}.search-card-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.search-card-actions button{min-height:42px}
 .media-choice-grid{grid-template-columns:1fr}.media-choice-card{min-height:135px}.profile-questionnaire{grid-template-columns:1fr}.profile-wide{grid-column:auto}.public-profile-head{grid-template-columns:82px minmax(0,1fr)}
 .voice-recording-bar{padding:5px 6px}.voice-recording-bar strong{font-size:11px}.voice-recording-bar button{font-size:11px;padding:5px}.voice-message,.pending-audio-preview{grid-template-columns:auto minmax(120px,1fr)}
 .emoji-panel{left:4px!important;right:4px!important;width:auto!important;grid-template-columns:repeat(5,1fr)!important}.emoji-choice{width:auto!important;height:54px!important}
}
@media(max-width:360px){.composer-row{grid-template-columns:minmax(0,1fr) 50px!important}.send-button{width:50px!important;min-width:50px!important}.recipient-meta{display:none}.composer-recipient strong{max-width:75%}.emoji-panel{grid-template-columns:repeat(4,1fr)!important}}


/* vAvtobyse 2.4 — фото групп и действия с изображениями */
.group-avatar-editor{display:flex;align-items:center;gap:12px;margin-bottom:12px;padding:10px;border:2px inset #fff;background:#e8eef5}.group-avatar-preview{width:68px!important;height:68px!important;min-width:68px;font-size:30px}.group-avatar-preview img{width:100%;height:100%;object-fit:cover}.group-avatar-actions{display:flex;flex-wrap:wrap;gap:6px}.clickable-avatar,.clickable-member-name{cursor:pointer}.clickable-member-name:hover{text-decoration:underline}.message-context-menu #contextCopyImageBtn,.message-context-menu #contextDownloadImageBtn{font-weight:700}.group-manager-controls[aria-busy="true"]{opacity:.65;pointer-events:none}
@media(max-width:560px){.group-avatar-editor{align-items:flex-start}.group-avatar-actions{flex-direction:column}.group-avatar-actions button{width:100%}}


/* vAvtobyse 2.5.1 — выбор друзей для групп */
.contact-picker-combobox{position:relative;margin-bottom:8px}
.contact-picker-search{min-height:40px}
.contact-picker-list{max-height:250px;overflow:auto;margin-top:4px;padding:3px;background:#fff;border:2px inset #fff}
.compact-picker .contact-picker-list{max-height:205px}
.contact-picker-row{display:grid;grid-template-columns:22px 42px minmax(0,1fr);gap:8px;align-items:center;min-height:52px;padding:5px 7px;border-bottom:1px solid #ddd;cursor:pointer;box-sizing:border-box}
.contact-picker-row:last-child{border-bottom:0}
.contact-picker-row:hover{background:#eef4ff}
.contact-picker-row.selected{background:#d9e7ff;outline:1px dotted #000080;outline-offset:-3px}
.contact-picker-row input{width:17px;height:17px}
.contact-picker-avatar{width:38px!important;height:38px!important;font-size:19px!important}
.contact-picker-info{display:grid;min-width:0}
.contact-picker-info strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.contact-picker-info span{margin-top:3px;color:#555;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.contact-picker-empty{padding:18px 10px;text-align:center;color:#555}
.selected-contacts-summary{min-height:22px;padding:5px 7px;margin:6px 0 9px;background:#eee;border:1px solid #aaa;color:#555;font-size:11px;box-sizing:border-box}
.selected-contacts-summary.has-selection{background:#e6f6e6;color:#145214;font-weight:700}
@media(max-width:720px){.contact-picker-list{max-height:36vh}}
@media(max-width:420px){.contact-picker-row{grid-template-columns:20px 38px minmax(0,1fr);padding-left:4px;padding-right:4px}}

/* vAvtobyse 2.5.2 — современный проигрыватель голосовых сообщений */
.voice-message.voice-player{
  display:grid;
  grid-template-columns:42px minmax(210px,1fr) 42px;
  align-items:center;
  gap:9px;
  width:min(500px,100%);
  min-height:62px;
  padding:8px 9px;
  box-sizing:border-box;
  border:2px inset #fff;
  background:#e8eef5;
}
.voice-player-audio{display:none}
.voice-play-button,.voice-speed-button{
  width:40px;
  height:40px;
  min-width:40px;
  padding:0!important;
  display:grid!important;
  place-items:center;
  border:2px solid;
  border-color:#fff #000 #000 #fff;
  background:#c0c0c0;
  color:#000080;
  font:700 14px Tahoma,Arial,sans-serif;
  cursor:pointer;
}
.voice-play-button:active,.voice-speed-button:active{border-color:#000 #fff #fff #000;transform:translate(1px,1px)}
.voice-player.playing .voice-play-button{background:#000080;color:#fff}
.voice-speed-button{font-size:12px;color:#000;white-space:nowrap}
.voice-player-main{display:grid;gap:5px;min-width:0}
.voice-progress{
  --voice-progress:0%;
  width:100%;
  height:22px;
  margin:0;
  padding:0;
  cursor:pointer;
  background:transparent;
  accent-color:#000080;
}
.voice-progress::-webkit-slider-runnable-track{height:8px;border:1px solid #606060;background:linear-gradient(to right,#000080 0 var(--voice-progress),#fff var(--voice-progress) 100%)}
.voice-progress::-webkit-slider-thumb{width:16px;height:20px;margin-top:-7px;border:2px solid;border-color:#fff #000 #000 #fff;border-radius:0;background:#c0c0c0;-webkit-appearance:none}
.voice-progress{-webkit-appearance:none;appearance:none}
.voice-progress::-moz-range-track{height:8px;border:1px solid #606060;background:#fff}
.voice-progress::-moz-range-progress{height:8px;background:#000080}
.voice-progress::-moz-range-thumb{width:14px;height:18px;border:2px solid;border-color:#fff #000 #000 #fff;border-radius:0;background:#c0c0c0}
.voice-progress:disabled{cursor:wait;opacity:.55}
.voice-player-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;font-size:10px;color:#444}
.voice-message-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700;color:#333}
.voice-player-time{flex:0 0 auto;font:10px Consolas,monospace;color:#222}
.voice-player-error{background:#fff0f0}
.pending-audio-preview.voice-player{width:min(500px,calc(100% - 34px));margin-right:34px}
@media(max-width:720px){
  .voice-message.voice-player{grid-template-columns:40px minmax(135px,1fr) 40px;gap:7px;width:100%;padding:7px;min-height:58px}
  .voice-play-button,.voice-speed-button{width:38px;height:38px;min-width:38px}
  .voice-player-meta{font-size:9px}.voice-player-time{font-size:9px}
  .pending-audio-preview.voice-player{width:calc(100% - 32px);margin-right:32px}
}
@media(max-width:380px){
  .voice-message.voice-player{grid-template-columns:38px minmax(105px,1fr) 38px;gap:5px;padding:6px}
  .voice-play-button,.voice-speed-button{width:36px;height:36px;min-width:36px;font-size:11px}
  .voice-message-label{max-width:115px}
}


/* vAvtobyse 2.5.4 — классические смайлики и отдельное окно пароля */
.retro-emote,.emoji-sprite{
  display:inline-block;
  flex:0 0 auto;
  background-image:url('emotes/qip2007-sprite.png?v=2.5-step4');
  background-repeat:no-repeat;
  background-size:800% 800%;
  image-rendering:pixelated;
  image-rendering:crisp-edges;
}
.retro-emote{vertical-align:middle;background-color:transparent}
.emoji-sprite{background-color:transparent;pointer-events:none}


/* vAvtobyse 2.5.5 — меняющиеся подсказки на экране загрузки */
#loadingScreen .small-window{width:min(460px,100%)}
.loading-content{padding:20px 22px 18px}
.loading-status{margin:9px 0 13px;font-weight:700}
.loading-tip-card{
  min-height:88px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:9px;
  align-items:start;
  padding:10px;
  border:2px solid;
  border-color:#808080 #fff #fff #808080;
  background:#ffffdf;
  color:#202020;
  text-align:left;
  box-shadow:inset 1px 1px 0 #000;
}
.loading-tip-icon{font-size:25px;line-height:1.1;filter:drop-shadow(1px 1px 0 rgba(0,0,0,.25))}
.loading-tip-copy{min-width:0}
.loading-tip-copy strong{display:block;margin-bottom:4px;color:#000080;font-size:12px}
.loading-tip-copy p{min-height:38px;margin:0;font-size:12px;line-height:1.42}
.loading-tip-change{animation:loading-tip-in .28s ease-out}
.loading-tip-progress{display:flex;justify-content:center;gap:5px;margin-top:10px}
.loading-tip-progress span{width:6px;height:6px;background:#808080;animation:loading-tip-dot 1.2s steps(2,end) infinite}
.loading-tip-progress span:nth-child(2){animation-delay:.2s}
.loading-tip-progress span:nth-child(3){animation-delay:.4s}
@keyframes loading-tip-in{from{opacity:.15;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@keyframes loading-tip-dot{0%,55%,100%{background:#808080}25%{background:#000080}}
@media(max-width:480px){
  #loadingScreen .small-window{width:100%}
  .loading-content{padding:17px 14px 15px}
  .loading-tip-card{min-height:102px;grid-template-columns:30px minmax(0,1fr);padding:9px}
  .loading-tip-icon{font-size:22px}
}
@media(prefers-reduced-motion:reduce){
  .loading-tip-change,.loading-tip-progress span{animation:none}
}

/* =========================================================
   vAvtobyse 2.6.2 — единый стиль плиток, иконок и подписей
   ========================================================= */
.action-toolbar{
  height:68px;
  min-height:68px;
  align-items:stretch;
  gap:5px;
}
.action-button{
  height:56px!important;
  min-height:56px!important;
  grid-template-rows:26px minmax(20px,auto)!important;
  align-content:center;
  padding:4px 3px!important;
}
.action-button .button-icon{
  width:24px!important;
  height:24px!important;
}
.action-button .button-label{
  display:-webkit-box!important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  max-width:100%;
  min-height:20px;
  white-space:normal!important;
  text-align:center;
  font:10px/10px Tahoma,Arial,sans-serif!important;
}
.action-button:active{padding:4px 3px!important}

.sidebar-tab{
  font:12px/1 Tahoma,Arial,sans-serif!important;
}
.sidebar-tab span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  font-weight:400;
}
.sidebar-tab img{
  width:20px!important;
  height:20px!important;
}
.sidebar-tab b{
  min-width:22px!important;
  height:18px;
  box-sizing:border-box;
  display:grid;
  place-items:center;
  padding:0 4px!important;
  font:700 10px/1 Tahoma,Arial,sans-serif!important;
}

.mobile-nav-button{
  grid-template-rows:28px 22px;
  align-content:center;
  justify-items:center;
  min-height:58px;
}
.mobile-nav-button img{
  width:26px!important;
  height:26px!important;
}
.mobile-nav-button span{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  min-height:22px;
  padding:0 2px;
  overflow:hidden;
  text-align:center;
  font:10px/11px Tahoma,Arial,sans-serif!important;
}

.account-actions{
  align-items:stretch;
  grid-auto-rows:minmax(52px,auto);
  gap:8px;
}
.account-action-tile{
  min-width:0;
  min-height:52px!important;
  display:grid!important;
  grid-template-columns:28px minmax(0,1fr);
  align-items:center;
  gap:9px;
  padding:8px 10px!important;
  text-align:left!important;
  font:12px/15px Tahoma,Arial,sans-serif!important;
}
.account-action-tile:active{padding:8px 10px!important}
.account-action-icon{
  width:24px;
  height:24px;
  display:block;
  justify-self:center;
  object-fit:contain;
  pointer-events:none;
}
.account-action-label{
  min-width:0;
  overflow-wrap:anywhere;
  font-weight:400;
}
.account-action-tile.danger-text .account-action-label{
  color:#8b0000;
  font-weight:700;
}

@media(max-width:820px){
  .mobile-bottom-nav{
    height:calc(72px + env(safe-area-inset-bottom));
  }
  .contacts-window{
    padding-bottom:calc(72px + env(safe-area-inset-bottom));
  }
  .mobile-nav-button{
    min-height:62px;
    grid-template-rows:28px 24px;
    padding:4px 2px!important;
  }
  .mobile-nav-button:active{padding:4px 2px!important}
  .mobile-nav-button span{
    min-height:24px;
    font-size:10px!important;
    line-height:11px!important;
    white-space:normal;
  }
  .account-actions{
    grid-template-columns:1fr!important;
    grid-auto-rows:minmax(54px,auto);
  }
  .account-action-tile{
    min-height:54px!important;
    font-size:13px!important;
  }
}

@media(max-width:390px){
  .sidebar-tab span{font-size:11px!important}
  .mobile-nav-button span{font-size:9px!important;line-height:10px!important}
}


/* =========================================================
   vAvtobyse 2.6.3 — новый стартовый экран «Автобус в прошлое»
   ========================================================= */
#loadingScreen{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 50% 14%, rgba(255,205,76,.18), transparent 24%),
    linear-gradient(180deg,#101216 0%,#0d0f13 48%,#171c22 100%);
}
#loadingScreen::before{
  content:'';
  position:absolute;
  inset:0;
  background:repeating-linear-gradient(180deg, rgba(255,255,255,.03) 0 2px, transparent 2px 4px);
  opacity:.24;
  pointer-events:none;
}
#loadingScreen::after{
  content:'';
  position:absolute;
  inset:0;
  background:radial-gradient(circle at center, transparent 52%, rgba(0,0,0,.48) 100%);
  pointer-events:none;
}
.retro-loading-shell{
  position:relative;
  z-index:1;
  width:min(520px,100%);
  display:grid;
  gap:14px;
  color:#f5e8b8;
}
.retro-splash-statusline{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:#7fd758;
  font:12px/1.4 "Courier New",monospace;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.retro-splash-card{
  position:relative;
  overflow:hidden;
  padding:24px 20px 18px;
  border:1px solid #343943;
  border-radius:24px;
  background:linear-gradient(180deg,#181d24 0%,#101317 72%,#161b22 100%);
  box-shadow:0 20px 50px rgba(0,0,0,.42), inset 0 0 0 1px rgba(255,226,138,.05);
  text-align:center;
}
.retro-splash-card::before{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(255,205,76,.06), transparent 24%);
  pointer-events:none;
}
.retro-splash-stars{position:absolute;inset:12px 16px auto;display:flex;justify-content:space-between;color:#ffe18a;opacity:.74;font-size:11px;pointer-events:none}
.retro-bus-mark{
  position:relative;
  width:132px;
  height:106px;
  margin:8px auto 12px;
  border:4px solid #191b1f;
  border-radius:28px;
  background:linear-gradient(180deg,#ffdd65 0%,#f7c944 70%,#efb838 100%);
  box-shadow:0 0 0 2px rgba(255,238,168,.08), 0 12px 20px rgba(0,0,0,.32);
}
.retro-bus-mark::after{
  content:'';
  position:absolute;
  left:16px;
  bottom:-16px;
  width:22px;
  height:22px;
  background:linear-gradient(180deg,#f7c944 0%,#efb838 100%);
  border-left:4px solid #191b1f;
  border-bottom:4px solid #191b1f;
  border-bottom-left-radius:7px;
  transform:rotate(32deg) skew(-8deg);
}
.retro-bus-window{
  position:absolute;
  left:17px;
  top:15px;
  width:86px;
  height:29px;
  border:4px solid #191b1f;
  border-radius:10px;
  background:linear-gradient(180deg,#1c2128 0%,#2b3440 50%,#161a1f 100%);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.04);
}
.retro-bus-door{
  position:absolute;
  right:18px;
  top:48px;
  width:19px;
  height:25px;
  border:4px solid #191b1f;
  border-radius:6px;
  background:rgba(33,38,46,.18);
}
.retro-bus-grill{
  position:absolute;
  left:22px;
  right:22px;
  bottom:24px;
  height:14px;
  border-top:4px solid #191b1f;
  border-bottom:4px solid #191b1f;
}
.retro-bus-lights span,.retro-bus-wheels span{position:absolute;display:block}
.retro-bus-lights span{
  bottom:18px;
  width:14px;
  height:14px;
  border:4px solid #191b1f;
  border-radius:50%;
  background:#fff4be;
}
.retro-bus-lights span:first-child{left:14px}
.retro-bus-lights span:last-child{right:14px}
.retro-bus-wheels span{
  bottom:8px;
  width:18px;
  height:8px;
  border-radius:999px;
  background:#191b1f;
}
.retro-bus-wheels span:first-child{left:28px}
.retro-bus-wheels span:last-child{right:28px}
.retro-brand-wordmark{
  position:relative;
  font-family:"Trebuchet MS",Tahoma,Verdana,sans-serif;
  font-weight:800;
  font-size:34px;
  line-height:1;
  letter-spacing:.03em;
  color:#f7edd1;
  text-shadow:0 2px 0 rgba(0,0,0,.35);
}
.retro-brand-tagline{
  margin-top:7px;
  color:#f3c64a;
  font:700 15px/1.3 "Courier New",monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.retro-launch-panel{display:grid;gap:8px;justify-items:center;margin-top:18px}
.retro-launch-button,.retro-entry-link{transition:transform .16s ease, box-shadow .16s ease, background .16s ease}
.retro-launch-button{
  min-width:230px;
  padding:13px 18px;
  border:0;
  border-radius:16px;
  background:linear-gradient(180deg,#ffdd65 0%,#efb838 100%);
  color:#151718;
  font:800 17px/1 "Trebuchet MS",Tahoma,Verdana,sans-serif;
  letter-spacing:.06em;
  text-transform:uppercase;
  box-shadow:0 7px 18px rgba(0,0,0,.28), inset 0 -2px 0 rgba(0,0,0,.18);
}
.retro-launch-button:hover,.retro-launch-button:focus{transform:translateY(-1px);background:linear-gradient(180deg,#ffe17c 0%,#f4c34c 100%)}
.retro-launch-button.is-pressed{transform:translateY(1px) scale(.99)}
.retro-entry-link{
  border:0;
  background:transparent;
  color:#d2d8e1;
  font:700 13px/1.3 Tahoma,Verdana,sans-serif;
}
.retro-entry-link span{color:#f1c343}
.retro-entry-link:hover,.retro-entry-link:focus{color:#f7edd1}
.retro-cityline{
  position:relative;
  height:104px;
  margin-top:18px;
  display:flex;
  align-items:flex-end;
  gap:4px;
  padding:0 6px;
}
.retro-cityline > span{
  display:block;
  flex:1 1 auto;
  background:linear-gradient(180deg,#232932 0%,#181d24 100%);
  border:1px solid rgba(255,214,108,.08);
  border-bottom:none;
  border-radius:4px 4px 0 0;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);
}
.retro-cityline > span:nth-child(1){height:36px}.retro-cityline > span:nth-child(2){height:62px}.retro-cityline > span:nth-child(3){height:44px}.retro-cityline > span:nth-child(4){height:76px}.retro-cityline > span:nth-child(5){height:52px}.retro-cityline > span:nth-child(6){height:68px}.retro-cityline > span:nth-child(7){height:40px}.retro-cityline > span:nth-child(8){height:56px}
.retro-road{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:22px;
  border-top:1px solid rgba(255,198,74,.2);
  background:linear-gradient(180deg,rgba(34,39,47,.92),rgba(16,18,22,.98));
}
.retro-road::before{
  content:'';
  position:absolute;
  left:10%;
  right:10%;
  top:10px;
  border-top:2px dashed rgba(255,214,108,.45);
}
.retro-mini-bus{
  position:absolute;
  right:20px;
  top:2px;
  width:38px;
  height:16px;
  border:2px solid #111317;
  border-radius:5px;
  background:linear-gradient(180deg,#ffd55a 0%,#efb838 100%);
}
.retro-mini-bus::before{
  content:'';
  position:absolute;
  left:6px;
  right:9px;
  top:3px;
  height:5px;
  border-radius:2px;
  background:#161b21;
}
.retro-mini-bus::after{
  content:'';
  position:absolute;
  left:4px;
  bottom:-4px;
  width:6px;
  height:6px;
  border-radius:50%;
  background:#111317;
  box-shadow:21px 0 0 #111317;
}
.retro-loading-panel{
  padding:16px 16px 14px;
  border:1px solid #2e343d;
  border-radius:18px;
  background:linear-gradient(180deg,rgba(22,26,32,.95),rgba(13,15,18,.98));
  box-shadow:0 12px 28px rgba(0,0,0,.28);
}
#loadingScreen .loading-status{
  margin:0 0 11px;
  text-align:center;
  color:#f5e1a3;
  font:700 13px/1.4 "Courier New",monospace;
  letter-spacing:.14em;
  text-transform:uppercase;
}
#loadingScreen .loading-tip-card{
  min-height:88px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px;
  align-items:start;
  padding:11px;
  border:1px solid #39404a;
  border-radius:14px;
  background:linear-gradient(180deg,#171b22 0%,#101318 100%);
  color:#e3e6eb;
  text-align:left;
  box-shadow:inset 0 0 0 1px rgba(255,214,108,.05);
}
#loadingScreen .loading-tip-icon{font-size:24px;line-height:1.1;color:#f1c343;filter:none}
#loadingScreen .loading-tip-copy strong{display:block;margin-bottom:4px;color:#f3c64a;font-size:12px;letter-spacing:.08em;text-transform:uppercase}
#loadingScreen .loading-tip-copy p{min-height:38px;margin:0;font-size:12px;line-height:1.42;color:#d5d9df}
#loadingScreen .loading-tip-progress{display:flex;justify-content:center;gap:7px;margin-top:11px}
#loadingScreen .loading-tip-progress span{width:7px;height:7px;border-radius:50%;background:#4f5865;animation:loading-tip-dot 1.2s steps(2,end) infinite}
#loadingScreen .loading-tip-progress span:nth-child(2){animation-delay:.2s}
#loadingScreen .loading-tip-progress span:nth-child(3){animation-delay:.4s}
@keyframes loading-tip-dot{0%,55%,100%{background:#4f5865}25%{background:#f1c343}}
@media(max-width:560px){
  #loadingScreen{padding:12px}
  .retro-loading-shell{gap:11px}
  .retro-splash-statusline{font-size:11px}
  .retro-splash-card{padding:20px 14px 16px;border-radius:20px}
  .retro-bus-mark{width:118px;height:96px;margin-top:10px}
  .retro-bus-window{left:14px;width:79px;height:27px}
  .retro-brand-wordmark{font-size:28px}
  .retro-brand-tagline{font-size:13px;letter-spacing:.1em}
  .retro-launch-button{min-width:100%;font-size:16px;padding:12px 14px}
  .retro-entry-link{font-size:12px}
  .retro-cityline{height:92px;margin-top:15px;padding:0 2px}
  .retro-loading-panel{padding:14px 12px 12px;border-radius:15px}
  #loadingScreen .loading-tip-card{min-height:102px;grid-template-columns:28px minmax(0,1fr);padding:10px;border-radius:12px}
  #loadingScreen .loading-tip-icon{font-size:21px}
}
@media(prefers-reduced-motion:reduce){
  .retro-launch-button,.retro-entry-link{transition:none}
}

/* =========================================================
   vAvtobyse 2.6.3 — утверждённый стартовый экран
   Используется готовый одобренный макет без перерисовки.
   ========================================================= */
.brand-start-screen{
  min-height:100vh;
  min-height:100dvh;
  padding:0!important;
  overflow:hidden;
  background:#080907;
}
.brand-start-visual{
  width:100%;
  height:100vh;
  height:100dvh;
  display:flex;
  flex-direction:column;
  background:#080907;
  color:#fff3cf;
}
.brand-start-picture{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#080907;
}
.brand-start-image{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  user-select:none;
  -webkit-user-drag:none;
}
.brand-loading-overlay{
  flex:0 0 auto;
  min-height:92px;
  padding:10px max(14px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));
  border-top:1px solid rgba(255,211,38,.42);
  background:linear-gradient(180deg,rgba(8,9,7,.96),rgba(4,5,4,.99));
  box-shadow:0 -10px 34px rgba(0,0,0,.48);
}
.brand-loading-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:0 auto 6px;
  color:#ffd326;
}
.brand-loading-row .loading-status{
  margin:0;
  color:#ffd326;
  font:700 12px/1.2 "Courier New",monospace;
  letter-spacing:.04em;
  text-shadow:0 0 10px rgba(255,211,38,.22);
}
.brand-pixel-loader{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.brand-pixel-loader i{
  display:block;
  width:6px;
  height:6px;
  background:#ffd326;
  box-shadow:0 0 7px rgba(255,211,38,.45);
  animation:brand-pixel-pulse 1.05s steps(2,end) infinite;
}
.brand-pixel-loader i:nth-child(2){animation-delay:.18s}
.brand-pixel-loader i:nth-child(3){animation-delay:.36s}
.brand-loading-tip{
  width:min(760px,100%);
  min-height:34px;
  margin:0 auto;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  gap:7px;
  text-align:center;
  color:#e9e5d6;
  font:11px/1.38 Arial,sans-serif;
}
.brand-loading-tip strong{
  flex:0 0 auto;
  color:#ffd326;
  font-weight:700;
}
.brand-loading-tip p{
  margin:0;
  min-height:0;
}
.brand-loading-tip .loading-tip-change,
.brand-loading-tip #loadingTip.loading-tip-change{
  animation:brand-tip-in .28s ease-out;
}
@keyframes brand-pixel-pulse{
  0%,55%,100%{opacity:.28;transform:translateY(0)}
  25%{opacity:1;transform:translateY(-2px)}
}
@keyframes brand-tip-in{
  from{opacity:.15;transform:translateY(3px)}
  to{opacity:1;transform:translateY(0)}
}
@media(max-width:700px){
  .brand-loading-overlay{min-height:106px;padding-top:9px}
  .brand-start-image{object-fit:contain;object-position:center}
  .brand-loading-tip{display:block;font-size:10.5px;line-height:1.35}
  .brand-loading-tip strong{display:block;margin-bottom:2px}
}
@media(max-width:380px){
  .brand-loading-overlay{min-height:112px;padding-left:10px;padding-right:10px}
  .brand-loading-row .loading-status{font-size:11px}
  .brand-loading-tip{font-size:10px}
}
@media(prefers-reduced-motion:reduce){
  .brand-pixel-loader i,.brand-loading-tip .loading-tip-change{animation:none}
}

/* =========================================================
   vAvtobyse 2.6.4 — закреплённые чаты
   ========================================================= */
.conversation-section-label{
  padding:7px 10px 5px;
  border-bottom:1px solid #cfcfcf;
  background:#ece9d8;
  color:#4b4b4b;
  font-size:10px;
  font-weight:700;
  letter-spacing:.02em;
  text-transform:uppercase;
}
.conversation-item.pinned{
  background:#fffbea;
}
.conversation-item.pinned:hover{
  background:#fff4bd!important;
}
.conversation-item.pinned.selected{
  background:#000080!important;
}
.conversation-pinned-mark{
  flex:0 0 auto;
  font-size:12px;
  line-height:1;
  filter:grayscale(.15);
}
.conversation-trailing{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-width:30px;
}
.conversation-pin-button{
  width:28px;
  height:25px;
  min-width:28px;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid transparent;
  border-radius:3px;
  background:transparent;
  color:#555;
  font:14px/1 "Segoe UI Emoji","Noto Color Emoji",sans-serif;
  cursor:pointer;
  opacity:.38;
}
.conversation-item:hover .conversation-pin-button,
.conversation-pin-button:focus-visible,
.conversation-pin-button.active{
  opacity:1;
}
.conversation-pin-button:hover,
.conversation-pin-button:focus-visible{
  border-color:#808080;
  background:#ece9d8;
  outline:1px dotted #000;
  outline-offset:-3px;
}
.conversation-pin-button.active{
  border-color:#c89b00;
  background:#fff0a8;
}
.conversation-item.selected .conversation-pin-button{
  color:#fff;
}
.conversation-item.selected .conversation-pin-button.active{
  color:#000;
}
@media(max-width:820px){
  .conversation-section-label{padding:8px 12px 6px;font-size:11px}
  .conversation-trailing{min-width:34px;gap:6px}
  .conversation-pin-button{width:32px;height:30px;min-width:32px;opacity:.62;font-size:15px}
  .conversation-pin-button.active{opacity:1}
}


/* vAvtobyse 2.6.5 — множественное цитирование сообщений */
.message-inline-quote{
  margin:4px 0 7px;
  padding:6px 8px;
  border-left:4px solid #d4a514;
  background:#fff8d8;
  color:#44370d;
  border-radius:2px;
  box-shadow:inset 0 0 0 1px rgba(171,129,0,.16);
  white-space:normal;
}
.message-inline-quote-author{font-weight:700;font-size:11px;color:#725800;margin-bottom:3px}
.message-inline-quote-text{font-size:11px;line-height:1.38;white-space:pre-wrap;overflow-wrap:anywhere}
.selection-bar{flex-wrap:wrap}
@media(max-width:480px){
  .selection-bar{gap:5px}
  .selection-bar .primary,.selection-bar .secondary{padding:6px 7px;font-size:10px}
}


/* =========================================================
   vAvtobyse 2.6.6 — завершение блока «Сообщения»
   Быстрые реакции, черновики и индикатор набора текста
   ========================================================= */
.typing-indicator{
  min-height:24px;
  padding:5px 14px 4px 56px;
  border-bottom:1px solid #9b9b74;
  background:#fffbd7;
  color:#5f5600;
  font-size:11px;
  font-weight:700;
  line-height:1.3;
}
.typing-indicator::before{
  content:'•••';
  display:inline-block;
  margin-right:7px;
  letter-spacing:2px;
  color:#b38c00;
  animation:typing-dots 1s steps(3,end) infinite;
}
@keyframes typing-dots{0%,20%{opacity:.3}50%{opacity:1}100%{opacity:.55}}
.conversation-preview.has-draft{color:#a33b24!important;font-weight:700}
.context-reaction-bar{
  order:-1;
  margin-bottom:3px;
  border-bottom:1px solid #808080;
  padding-bottom:4px;
}
@media(max-width:720px),(hover:none){
  .typing-indicator{padding-left:12px;font-size:10px}
}
@media(prefers-reduced-motion:reduce){.typing-indicator::before{animation:none}}

/* vAvtobyse 2.9.19 — swipe-to-reply without desktop reaction clutter */
.message-row.has-message-actions{
  touch-action:pan-y;
}
.message-row.has-message-actions .message-content{
  transform:translateX(var(--message-swipe-x, 0));
  transition:transform .18s cubic-bezier(.2,.75,.25,1);
  will-change:transform;
}
.message-row.message-swipe-active .message-content{
  transition:none;
}
.message-row.has-message-actions .message-content::before{
  content:'↩';
  position:absolute;
  left:-38px;
  top:50%;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border:1px solid var(--th-border,#808080);
  border-radius:50%;
  background:var(--th-button,#f2f2f2);
  color:var(--th-muted,#666);
  box-shadow:0 2px 7px rgba(0,0,0,.16);
  opacity:0;
  transform:translateY(-50%) scale(.72);
  transition:opacity .12s ease,transform .12s ease,color .12s ease,background .12s ease;
  pointer-events:none;
}
.message-row.mine.has-message-actions .message-content::before{
  left:auto;
  right:-38px;
}
.message-row.message-swipe-active .message-content::before{
  opacity:.72;
  transform:translateY(-50%) scale(.9);
}
.message-row.message-swipe-ready .message-content::before{
  opacity:1;
  transform:translateY(-50%) scale(1);
  background:var(--th-accent,#d7ab32);
  color:var(--th-primary-text,#111);
}
@media(hover:hover) and (pointer:fine){
  .message-row.has-message-actions .message-content::before{display:none}
}
@media(prefers-reduced-motion:reduce){
  .message-row.has-message-actions .message-content,
  .message-row.has-message-actions .message-content::before{transition:none}
}


/* =========================================================
   vAvtobyse 2.6.7 — анкета пользователя и кастомные статусы
   ========================================================= */
.status-preset-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  margin-top:7px;
}
.status-preset{
  min-height:38px;
  padding:6px 7px;
  border:2px outset #fff;
  background:#e6e6e6;
  color:#242424;
  font:700 11px Tahoma,Arial,sans-serif;
  text-align:left;
  cursor:pointer;
}
.status-preset:hover{background:#fff5ad}
.status-preset:active,.status-preset.active{
  border-style:inset;
  background:#ffd83d;
  color:#181818;
}
.profile-questionnaire>div b{
  display:block;
  line-height:1.35;
  overflow-wrap:anywhere;
}
#publicProfileActivity{color:#5f4800}
#publicProfileLastSeen{color:#415b6b}
@media(max-width:520px){
  .status-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .status-preset{min-height:42px;font-size:12px}
}


/* =========================================================
   vAvtobyse 2.6.8 — блок 4, часть 1: приглашения в группы
   ========================================================= */
.group-invite-box{
  margin:12px 0;
  padding:10px;
  border:2px solid;
  border-color:#fff #777 #777 #fff;
  background:#f4f0d0;
}
.group-invite-options{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
.group-invite-options label{display:grid;gap:4px;font-size:11px;font-weight:700}
.group-invite-output{margin-top:8px}
.group-invite-link{font-size:10px;overflow-wrap:anywhere;user-select:text}
.group-invite-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:7px}
@media(max-width:520px){
  .group-invite-options,.group-invite-actions{grid-template-columns:1fr}
  .group-invite-box{padding:8px}
}

/* =========================================================
   vAvtobyse 2.6.9 — темы оформления
   Пять общих тем + скрытая Trip только для ID 1
   ========================================================= */
html[data-theme="classic-qip"]{
  /* Тема 2 — Светлый QIP 2007. Та же структура и те же иконки vAvtobyse. */
  --th-body:linear-gradient(145deg,#f7f3e8 0%,#edf6ff 52%,#e4f1fb 100%);
  --th-panel:#fbfdff;--th-panel-alt:#f0f7fd;--th-panel-strong:#dceaf7;
  --th-title-a:#cfe7fb;--th-title-b:#8dbce8;--th-title-text:#194d7d;
  --th-text:#24384b;--th-muted:#6f8292;--th-accent:#2e78c4;--th-accent-2:#70b85d;
  --th-border:#adc9e2;--th-input:#fff;--th-chat:#fffdf7;--th-message:#fff;--th-message-mine:#fff1be;
  --th-hover:#e6f2fb;--th-selected:#d8ebfb;--th-button-a:#fff;--th-button-b:#e1eef9;
  --th-primary-a:#87c969;--th-primary-b:#5da644;--th-primary-text:#17320e;
  --th-shadow:0 12px 30px rgba(77,116,148,.18);--th-icon-filter:none;
}
html[data-theme="win98"]{
  /* Тема 3 — Windows Retro. Меняем chrome, не набор иконок. */
  --th-body:linear-gradient(#cfe2fb,#e9eef2 72%,#97bb77);--th-panel:#d4d0c8;--th-panel-alt:#ece9d8;--th-panel-strong:#c0c0c0;
  --th-title-a:#0a6ad8;--th-title-b:#064aa7;--th-title-text:#fff;
  --th-text:#101010;--th-muted:#505050;--th-accent:#0a64c8;--th-accent-2:#2f76c8;
  --th-border:#526b8f;--th-input:#fff;--th-chat:#efefef;--th-message:#f7f7f7;--th-message-mine:#fff0a8;
  --th-hover:#e5e5e5;--th-selected:#c9ddf7;--th-button-a:#f6f6f6;--th-button-b:#c8c8c8;
  --th-primary-a:#f6f6f6;--th-primary-b:#c8c8c8;--th-primary-text:#111;
  --th-shadow:3px 3px 0 rgba(0,0,0,.24);--th-icon-filter:none;
}
html[data-theme="dark-retro"]{
  /* Тема 5 — Neutral Dark. */
  --th-body:#171b1f;--th-panel:#20262c;--th-panel-alt:#272e35;--th-panel-strong:#303840;
  --th-title-a:#2c333a;--th-title-b:#20262c;--th-title-text:#edf1f4;
  --th-text:#e7ebee;--th-muted:#9aa5ae;--th-accent:#8292a3;--th-accent-2:#72879f;
  --th-border:#3d4852;--th-input:#181d22;--th-chat:#1a1f24;--th-message:#272d33;--th-message-mine:#34404b;
  --th-hover:#303840;--th-selected:#39444e;--th-button-a:#313941;--th-button-b:#252c32;
  --th-primary-a:#aeb9c4;--th-primary-b:#8593a0;--th-primary-text:#15191d;
  --th-shadow:0 12px 30px rgba(0,0,0,.34);--th-icon-filter:grayscale(1) brightness(1.25);
}
html[data-theme="light-retro"]{
  /* Тема 4 — Neutral Light. */
  --th-body:#f4f6f8;--th-panel:#fff;--th-panel-alt:#f6f8fa;--th-panel-strong:#edf1f4;
  --th-title-a:#fbfcfd;--th-title-b:#eef2f5;--th-title-text:#27313b;
  --th-text:#27313b;--th-muted:#7b8792;--th-accent:#347bc5;--th-accent-2:#64788b;
  --th-border:#d5dde4;--th-input:#fff;--th-chat:#fff;--th-message:#fff;--th-message-mine:#eef3f7;
  --th-hover:#f0f4f7;--th-selected:#e5edf4;--th-button-a:#fff;--th-button-b:#edf1f4;
  --th-primary-a:#438bd4;--th-primary-b:#2f73b8;--th-primary-text:#fff;
  --th-shadow:0 10px 28px rgba(53,69,82,.13);--th-icon-filter:grayscale(.15);
}
html[data-theme="bus-past"]{
  /* Тема 1 — Автобус в прошлое. Главная палитра: мокрый асфальт, не чистый чёрный. */
  --th-body:radial-gradient(circle at 52% -15%,rgba(226,182,78,.11),transparent 36%),linear-gradient(145deg,#303a40 0%,#273137 48%,#222b30 100%);
  --th-panel:#30383d;--th-panel-alt:#374147;--th-panel-strong:#414a4e;
  --th-title-a:#3b4448;--th-title-b:#2d3539;--th-title-text:#f1e6d0;
  --th-text:#eee5d4;--th-muted:#bcb29f;--th-accent:#e2b64e;--th-accent-2:#cda040;
  --th-border:#62635d;--th-input:#283136;--th-chat:#2b3439;--th-message:#3a4246;--th-message-mine:#5a4b2a;
  --th-hover:#414a4e;--th-selected:#51472f;--th-button-a:#444c4f;--th-button-b:#343c40;
  --th-primary-a:#efc866;--th-primary-b:#d5a63d;--th-primary-text:#2a2417;
  --th-shadow:0 0 0 1px rgba(226,182,78,.10),0 14px 34px rgba(10,15,18,.34);--th-icon-filter:sepia(1) saturate(1.8) hue-rotate(353deg) brightness(1.08);
}
html[data-theme="lsd-trail"]{
  /* Тема 6 — Trip. Скрыта для всех кроме ID 1; иконки остаются фирменными. */
  --th-body:radial-gradient(circle at 12% 18%,rgba(0,229,255,.29),transparent 28%),radial-gradient(circle at 86% 18%,rgba(255,31,209,.31),transparent 30%),radial-gradient(circle at 46% 92%,rgba(118,71,255,.25),transparent 34%),#10051d;
  --th-panel:#180a29;--th-panel-alt:#24103a;--th-panel-strong:#32164b;
  --th-title-a:#d92fcf;--th-title-b:#5120c8;--th-title-text:#fff;
  --th-text:#fff;--th-muted:#d7b6ee;--th-accent:#ff4ec7;--th-accent-2:#36e5ff;
  --th-border:#8249c7;--th-input:#13071f;--th-chat:#12071e;--th-message:#28103b;--th-message-mine:#45205f;
  --th-hover:#3a1651;--th-selected:#52206e;--th-button-a:#4a1d61;--th-button-b:#2a0d3c;
  --th-primary-a:#ff5dd2;--th-primary-b:#8357ff;--th-primary-text:#17051d;
  --th-shadow:-4px 0 0 rgba(0,229,255,.12),4px 0 0 rgba(255,31,209,.14),0 14px 38px rgba(0,0,0,.55);--th-icon-filter:invert(1) sepia(1) saturate(5) hue-rotate(235deg) brightness(1.1);
}

html[data-theme] body{
  background:var(--th-body)!important;color:var(--th-text)!important;
}
html[data-theme] .qip-window{
  background:var(--th-panel)!important;border-color:var(--th-border)!important;box-shadow:var(--th-shadow)!important;color:var(--th-text)!important;
}
html[data-theme] .titlebar{
  color:var(--th-title-text)!important;background:linear-gradient(var(--th-title-a),var(--th-title-b))!important;border-bottom-color:var(--th-border)!important;
}
html[data-theme] .toolbar,
html[data-theme] .composer-toolbar,
html[data-theme] .statusbar,
html[data-theme] .modal-actions,
html[data-theme] .list-heading,
html[data-theme] .auth-tabs,
html[data-theme] .mobile-bottom-nav{
  background:linear-gradient(var(--th-button-a),var(--th-panel-strong))!important;border-color:var(--th-border)!important;color:var(--th-text)!important;
}
html[data-theme] .profile-card,
html[data-theme] .id-search-box,
html[data-theme] .chat-header,
html[data-theme] .composer,
html[data-theme] .account-summary,
html[data-theme] .public-profile-head,
html[data-theme] .profile-questionnaire>div,
html[data-theme] .activity-preview,
html[data-theme] .search-result,
html[data-theme] .group-invite-box,
html[data-theme] .loading-tip-card{
  background:var(--th-panel-alt)!important;border-color:var(--th-border)!important;color:var(--th-text)!important;
}
html[data-theme] .message-list,
html[data-theme] .empty-chat{
  background:var(--th-chat)!important;color:var(--th-muted)!important;
}
html[data-theme] .message-bubble,
html[data-theme] .copy-box,
html[data-theme] .pending-file,
html[data-theme] .file-card,
html[data-theme] .forward-chat-button,
html[data-theme] .message-context-menu,
html[data-theme] .message-menu,
html[data-theme] .emoji-panel{
  background:var(--th-message)!important;border-color:var(--th-border)!important;color:var(--th-text)!important;
}
html[data-theme] .message-row.mine .message-bubble{background:var(--th-message-mine)!important;border-color:var(--th-accent)!important}
html[data-theme] .qip-input,
html[data-theme] textarea,
html[data-theme] select,
html[data-theme] .profile-textarea{
  background:var(--th-input)!important;color:var(--th-text)!important;border-color:var(--th-border)!important;
}
html[data-theme] .qip-input::placeholder,
html[data-theme] textarea::placeholder{color:var(--th-muted)!important;opacity:.8}
html[data-theme] .primary,
html[data-theme] .send-button{
  background:linear-gradient(var(--th-primary-a),var(--th-primary-b))!important;color:var(--th-primary-text)!important;border-color:var(--th-accent)!important;
}
html[data-theme] .secondary,
html[data-theme] .tool-button,
html[data-theme] .account-action-tile,
html[data-theme] .message-action-button,
html[data-theme] .emoji-choice,
html[data-theme] .mini-refresh,
html[data-theme] .mobile-nav-button,
html[data-theme] .sidebar-tab,
html[data-theme] .status-preset{
  background:linear-gradient(var(--th-button-a),var(--th-button-b))!important;color:var(--th-text)!important;border-color:var(--th-border)!important;
}
html[data-theme] .conversation-item:hover,
html[data-theme] .conversation-item.selected,
html[data-theme] .account-action-tile:hover,
html[data-theme] .message-context-menu button:hover,
html[data-theme] .message-menu button:hover,
html[data-theme] .emoji-choice:hover{
  background:var(--th-hover)!important;color:var(--th-text)!important;outline-color:var(--th-accent)!important;
}
html[data-theme] .sidebar-tab.active,
html[data-theme] .mobile-nav-button.active,
html[data-theme] .auth-tab.active,
html[data-theme] .status-preset.active{
  background:var(--th-selected)!important;color:var(--th-title-text)!important;border-color:var(--th-accent)!important;
}
html[data-theme] .conversation-section-label,
html[data-theme] .typing-indicator,
html[data-theme] .reply-preview,
html[data-theme] .message-inline-quote,
html[data-theme] .message-reply-quote,
html[data-theme] .forward-preview,
html[data-theme] .notice{
  background:var(--th-panel-alt)!important;color:var(--th-text)!important;border-color:var(--th-accent)!important;
}
html[data-theme] .conversation-preview,
html[data-theme] .chat-subtitle,
html[data-theme] .small-muted,
html[data-theme] .member-id,
html[data-theme] .search-id,
html[data-theme] .message-time,
html[data-theme] .file-size,
html[data-theme] .composer-tip,
html[data-theme] .profile-questionnaire span{
  color:var(--th-muted)!important;
}
html[data-theme] .message-author,
html[data-theme] .public-profile-login,
html[data-theme] .sound-section-title,
html[data-theme] .reply-preview-title,
html[data-theme] .message-reply-author{
  color:var(--th-accent-2)!important;
}
html[data-theme] .button-icon,
html[data-theme] .inline-icon,
html[data-theme] .sidebar-tab img,
html[data-theme] .mobile-nav-button img,
html[data-theme] .mini-refresh img,
html[data-theme] .account-action-icon,
html[data-theme] .chat-info-image{
  filter:var(--th-icon-filter)!important;
}
html[data-theme] .conversation-item.pinned{background:color-mix(in srgb,var(--th-panel-alt) 78%,var(--th-accent) 22%)!important}
html[data-theme] .conversation-pin-button.active{background:var(--th-accent)!important;color:var(--th-primary-text)!important;border-color:var(--th-accent)!important}
html[data-theme] .unread-badge{background:var(--th-accent)!important;color:var(--th-primary-text)!important;border-color:var(--th-border)!important}
html[data-theme] .reaction-chip.mine{background:var(--th-selected)!important;border-color:var(--th-accent)!important;color:var(--th-text)!important}
html[data-theme] .toast{background:var(--th-title-b)!important;color:var(--th-title-text)!important;border:1px solid var(--th-accent)!important}

/* Windows 98 deliberately keeps square, hard-edged windows. */
html[data-theme="win98"] .qip-window,
html[data-theme="win98"] .qip-input,
html[data-theme="win98"] button,
html[data-theme="win98"] .avatar{border-radius:0!important}
html[data-theme="win98"] .qip-window{border-width:2px!important;border-style:outset!important}
html[data-theme="win98"] .primary,
html[data-theme="win98"] .secondary,
html[data-theme="win98"] .tool-button,
html[data-theme="win98"] .account-action-tile{border:2px outset #fff!important;box-shadow:none!important}
html[data-theme="win98"] .primary:active,
html[data-theme="win98"] .secondary:active,
html[data-theme="win98"] .tool-button:active{border-style:inset!important}

/* Dark themes: retain readable media and neutral avatars. */
html[data-theme="dark-retro"] .image-message,
html[data-theme="bus-past"] .image-message,
html[data-theme="lsd-trail"] .image-message{background:#fff}
html[data-theme="dark-retro"] .avatar,
html[data-theme="bus-past"] .avatar,
html[data-theme="lsd-trail"] .avatar{box-shadow:inset 0 0 0 2px rgba(255,255,255,.25)}

/* Trip: chromatic pseudo-3D residual trail. Only ID 1 can select it. */
html[data-theme="lsd-trail"] body{animation:lsd-background-shift 10s linear infinite}
html[data-theme="lsd-trail"] .qip-window{
  box-shadow:-7px 1px 0 rgba(0,255,255,.23),7px 2px 0 rgba(255,0,204,.23),0 15px 38px rgba(0,0,0,.68)!important;
}
html[data-theme="lsd-trail"] .titlebar,
html[data-theme="lsd-trail"] .chat-title,
html[data-theme="lsd-trail"] .conversation-title,
html[data-theme="lsd-trail"] .profile-name{
  text-shadow:-2px 0 rgba(0,255,255,.82),2px 0 rgba(255,0,204,.82),0 0 8px rgba(255,255,255,.25)!important;
}
html[data-theme="lsd-trail"] .message-bubble{
  box-shadow:-3px 1px 0 rgba(0,255,255,.20),3px 2px 0 rgba(255,0,204,.20),0 3px 12px rgba(0,0,0,.32)!important;
}
html[data-theme="lsd-trail"] .avatar,
html[data-theme="lsd-trail"] .qip-logo{
  filter:drop-shadow(-3px 0 rgba(0,255,255,.55)) drop-shadow(3px 0 rgba(255,0,204,.55));
}
@keyframes lsd-background-shift{
  0%{background-position:0 0,0 0,0 0}
  50%{background-position:35px -18px,-28px 22px,12px 30px}
  100%{background-position:0 0,0 0,0 0}
}

/* Theme chooser */
.theme-modal{width:min(780px,96vw)}
.theme-admin-note{display:grid;gap:3px;padding:10px;margin-bottom:12px;border:2px inset #fff;background:#fff8ce;color:#342b00}
.theme-admin-note span{font-size:11px;line-height:1.4}
.theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.theme-card{position:relative;display:grid;grid-template-columns:96px minmax(0,1fr);grid-template-rows:auto auto auto;gap:4px 10px;min-height:112px;padding:9px;border:2px outset #fff;background:#d4d0c8;color:#111;text-align:left;cursor:pointer}
.theme-card:hover{outline:2px solid #f3c316;outline-offset:1px}
.theme-card.selected{border-style:inset;background:#fff4b5;outline:2px solid #c59600;outline-offset:0}
.theme-card strong{align-self:end;font-size:13px}
.theme-card small{line-height:1.35;color:#555}
.theme-selected-mark{display:none;color:#5e4800;font-size:10px;font-weight:700}
.theme-card.selected .theme-selected-mark{display:block}
.theme-preview{grid-row:1/4;width:96px;height:78px;position:relative;overflow:hidden;border:2px inset #fff;background:#ddd}
.theme-preview::before{content:"";position:absolute;inset:0 0 auto;height:18px;background:#000080}
.theme-preview i{position:absolute;display:block}
.theme-preview i:nth-child(1){left:7px;top:27px;width:29px;height:38px;background:#fff;border:1px solid #555}
.theme-preview i:nth-child(2){left:42px;right:7px;top:27px;height:19px;background:#fff;border:1px solid #555}
.theme-preview i:nth-child(3){left:42px;right:7px;top:51px;height:14px;background:#ddd;border:1px solid #555}
.preview-classic{background:#dceff9}.preview-classic::before{background:linear-gradient(#75b2d8,#356f9b)}.preview-classic i:nth-child(3){background:#c4ef75}
.preview-win98{background:#008080}.preview-win98::before{background:#000080}.preview-win98 i:nth-child(1),.preview-win98 i:nth-child(2){background:#c0c0c0}.preview-win98 i:nth-child(3){background:#fff}
.preview-dark{background:#06110f}.preview-dark::before{background:#123f35}.preview-dark i:nth-child(1),.preview-dark i:nth-child(2){background:#10231f;border-color:#38f0a5}.preview-dark i:nth-child(3){background:#38f0a5;border-color:#38f0a5}
.preview-light{background:#eee2c2}.preview-light::before{background:#79552d}.preview-light i:nth-child(1),.preview-light i:nth-child(2){background:#fffaf0}.preview-light i:nth-child(3){background:#f2d780}
.preview-bus{background:#222b2e}.preview-bus::before{background:linear-gradient(#444238,#292b27)}.preview-bus i:nth-child(1){background:#e8dfca;border-color:#776f5c}.preview-bus i:nth-child(2){background:#323532;border-color:#d6ac49}.preview-bus i:nth-child(3){background:#ddb85c;border-color:#c99735}
.preview-lsd{background:linear-gradient(135deg,#13001d,#2f0050)}.preview-lsd::before{background:linear-gradient(90deg,#00ffe1,#ff2bd6)}.preview-lsd i:nth-child(1),.preview-lsd i:nth-child(2){background:#240737;border-color:#00ffe1;box-shadow:-3px 0 #00ffe1,3px 0 #ff2bd6}.preview-lsd i:nth-child(3){background:#b8ff1f;border-color:#ff2bd6;box-shadow:-3px 0 #00ffe1,3px 0 #ff2bd6}
.theme-current-line{margin-top:12px;padding:8px;border:1px solid var(--th-border,#808080);background:var(--th-panel-alt,#fff);color:var(--th-text,#111)}
html[data-theme] .theme-modal .theme-card{color:#111!important}
@media(max-width:680px){
  .theme-grid{grid-template-columns:1fr}
  .theme-card{grid-template-columns:84px minmax(0,1fr);min-height:104px}
  .theme-preview{width:84px;height:72px}
}
@media(prefers-reduced-motion:reduce){html[data-theme="lsd-trail"] body{animation:none}}

html[data-theme="win98"] .sidebar-tab.active img,html[data-theme="win98"] .mobile-nav-button.active img{filter:invert(1)!important}

/* =========================================================
   vAvtobyse 2.6.10 — Блок 4 «Группы» завершён
   ========================================================= */
.group-pinned-banner{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;
  padding:7px 10px;border-bottom:1px solid var(--border,#a9bfce);
  background:linear-gradient(90deg,#fff5bd,#fffbe3);color:#252525;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.8)
}
.group-pinned-icon{font-size:18px}.group-pinned-content,.group-pinned-settings-text{
  min-width:0;border:0;background:transparent;text-align:left;color:inherit;cursor:pointer;padding:0
}
.group-pinned-content strong{display:block;font-size:11px;color:#795600;margin-bottom:2px}
.group-pinned-content span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
.group-pinned-remove{width:28px;height:28px;border:1px solid #bda85e;background:#fff7cf;cursor:pointer;font-weight:bold}
.group-write-locked{padding:8px 10px;border:1px solid #d1a94c;background:#fff4c8;color:#6b4c00;font-size:12px;font-weight:700}
.group-overview-card,.group-pinned-settings,.group-media-box,.group-info-controls,.group-permissions-box{
  margin:0 0 12px;padding:10px;border:1px solid #b7cbd8;background:rgba(255,255,255,.72);border-radius:4px
}
.group-public-description{margin:5px 0 0;white-space:pre-wrap;line-height:1.45;color:var(--text,#273746)}
.group-pinned-settings-row{display:flex;align-items:center;gap:8px}.group-pinned-settings-text{flex:1;padding:8px;border:1px solid #d6bf68;background:#fff8d6;border-radius:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.group-media-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.group-media-shortcuts button{min-height:40px}
.group-permission-grid{display:grid;gap:9px;margin:9px 0}.group-permission-grid label{display:grid;gap:4px}.group-permission-grid label>span{font-size:11px;font-weight:700}
.group-media-modal{width:min(760px,calc(100vw - 24px));max-height:min(760px,calc(100vh - 24px))}.group-media-page{min-height:360px;overflow:auto}
.group-media-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-bottom:10px}.group-media-tab{min-height:38px;border:1px solid #9db4c2;background:#eaf3f8;font-weight:700;cursor:pointer}.group-media-tab.active{background:#356f9e;color:white;border-color:#285b82}
.group-media-list{display:grid;gap:10px}.group-media-empty{padding:36px 12px;text-align:center;color:var(--muted,#667b89)}
.group-media-item{padding:8px;border:1px solid #b7cbd8;background:rgba(255,255,255,.76);border-radius:4px}.group-media-meta{margin-top:6px;font-size:10px;color:var(--muted,#667b89)}
.group-media-photos{display:grid;grid-template-columns:minmax(0,220px) 1fr;align-items:center;gap:9px}.group-media-photos img{display:block;width:100%;max-height:180px;object-fit:cover;border:1px solid #91a9b9;border-radius:3px;cursor:pointer}
.group-media-photos img.group-media-lazy-image{aspect-ratio:4/3;min-height:120px;background:rgba(120,140,150,.12)}.group-media-photos img.group-media-lazy-image.lazy-media-pending{opacity:.72}.group-media-file-link.lazy-media-loading{opacity:.7;pointer-events:none}
.group-media-file-link{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;text-decoration:none;color:inherit;padding:9px;border:1px solid #adc2cf;background:#f1f8fc}.group-media-file-link span{font-size:24px}.group-media-file-link strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group-media-file-link small{color:var(--muted,#667b89)}
.message-context-menu #contextPinMessageBtn:not(.hidden-action){color:#725600;font-weight:700}
@media(max-width:600px){
  .group-media-shortcuts{grid-template-columns:1fr}.group-media-photos{grid-template-columns:1fr}.group-media-photos img{max-height:260px}.group-pinned-banner{padding:6px 8px}.group-pinned-content span{font-size:11px}
}
html[data-theme] .group-overview-card,
html[data-theme] .group-pinned-settings,
html[data-theme] .group-media-box,
html[data-theme] .group-info-controls,
html[data-theme] .group-permissions-box,
html[data-theme] .group-media-item{
  background:var(--th-panel-alt)!important;color:var(--th-text)!important;border-color:var(--th-border)!important
}
html[data-theme] .group-pinned-banner,
html[data-theme] .group-pinned-settings-text,
html[data-theme] .group-write-locked{
  background:var(--th-selected)!important;color:var(--th-text)!important;border-color:var(--th-accent)!important
}
html[data-theme] .group-media-tab,
html[data-theme] .group-media-file-link{
  background:var(--th-button)!important;color:var(--th-text)!important;border-color:var(--th-border)!important
}
html[data-theme] .group-media-tab.active{background:var(--th-accent)!important;color:var(--th-primary-text)!important}


/* vAvtobyse 2.7.2 — голосовое удержанием и свайпом */
.voice-hold-button{
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
}
.voice-hold-button.voice-pressing,
#voiceBtn.recording{
  transform:scale(.96);
  background:#ffd332!important;
  border-color:#ffe98b #8c6a00 #8c6a00 #ffe98b!important;
  box-shadow:0 0 0 2px rgba(255,211,50,.22),0 0 14px rgba(255,211,50,.42)!important;
}
#voiceBtn.voice-sending{opacity:.68;pointer-events:none}
.voice-recording-bar{
  min-height:44px;
  gap:9px;
  overflow:hidden;
  transition:background .16s ease,border-color .16s ease,transform .16s ease;
}
.voice-slide-hint{
  min-width:0;
  flex:1;
  margin-left:auto;
  text-align:right;
  color:#6b6b6b;
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.voice-recording-bar.cancel-ready{
  background:#ffe1e1!important;
  border-color:#ff8d8d #7f0000 #7f0000 #ff8d8d!important;
  transform:translateX(-4px);
}
.voice-recording-bar.cancel-ready .voice-slide-hint{color:#b00000;font-weight:700}
.voice-recording-bar.cancel-ready .voice-record-dot{animation:none;opacity:.35}
@media(max-width:520px){
  .voice-recording-bar{min-height:42px;padding:5px 7px}
  .voice-recording-bar strong{font-size:11px}
  .voice-slide-hint{font-size:10px}
}

/* vAvtobyse 2.7.3 — icon and sprite alignment audit */
.button-icon,.inline-icon,.sidebar-tab img,.mobile-nav-button img,.mini-refresh img,
.mobile-back-button img,.chat-info-image,.send-icon-image,.account-action-icon{
  object-fit:contain!important;
  object-position:center!important;
  aspect-ratio:1/1;
  flex:0 0 auto;
}
/* Native 28px cells prevent uneven pixel stretching in message bubbles. */
.retro-emote{
  width:28px!important;
  height:28px!important;
  animation:none!important;
  filter:drop-shadow(1px 1px 0 rgba(0,0,0,.35));
}
/* Exact 2x scale of the original 28px cells keeps the picker crisp. */
.emoji-panel{
  width:470px;
  grid-template-columns:repeat(7,minmax(56px,1fr));
  gap:5px;
}
.emoji-choice{
  min-width:60px!important;
  width:auto!important;
  height:62px!important;
  padding:2px!important;
  overflow:hidden;
}
.emoji-choice .emoji-sprite{
  width:56px!important;
  height:56px!important;
  animation:none!important;
  transform:none;
  image-rendering:pixelated;
}
.emoji-choice:hover .emoji-sprite{transform:scale(1.06)}
.emoji-choice:nth-child(3n) .emoji-sprite{animation-delay:0s}
@media(max-width:720px){
  .emoji-panel{grid-template-columns:repeat(5,minmax(56px,1fr))!important;gap:4px!important}
  .emoji-choice{min-width:56px!important;height:60px!important}
}
@media(max-width:360px){
  .emoji-panel{grid-template-columns:repeat(4,minmax(56px,1fr))!important}
}

/* =========================================================
   vAvtobyse 2.7.4 — раздельная механика голосовых ПК / телефон
   ========================================================= */
.mobile-voice-button,
.mobile-voice-label,
.voice-slide-hint{
  display:none;
}
.desktop-voice-button{
  touch-action:auto;
}
.desktop-voice-controls{
  display:flex;
  align-items:center;
  gap:6px;
}
.desktop-voice-controls .primary,
.desktop-voice-controls .secondary{
  min-height:32px;
  padding:5px 10px;
}
#voiceBtn.recording{
  transform:none!important;
  background:#ffd0d0!important;
  color:#a00000!important;
  box-shadow:none!important;
}
.mobile-voice-button{
  box-sizing:border-box;
  align-items:center;
  justify-content:center;
  border:2px solid;
  border-color:#fff #606060 #606060 #fff;
  background:var(--th-button,#c0c0c0);
  color:var(--th-text,#111);
  padding:0;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
  touch-action:none;
}
.mobile-voice-button img{
  display:block;
  width:26px;
  height:26px;
  object-fit:contain;
  pointer-events:none;
}
.mobile-voice-button.voice-pressing,
.mobile-voice-button.recording{
  transform:none!important;
  background:#ffd332!important;
  border-color:#ffe98b #8c6a00 #8c6a00 #ffe98b!important;
  box-shadow:0 0 0 2px rgba(255,211,50,.18)!important;
}
.mobile-voice-button.voice-sending{
  opacity:.68;
  pointer-events:none;
}

@media (pointer:coarse){
  #voiceBtn{
    display:none!important;
  }
  .composer{
    position:relative;
  }
  .composer-row{
    grid-template-columns:minmax(0,1fr) 52px 52px!important;
    gap:5px!important;
    align-items:end!important;
  }
  .mobile-voice-button{
    display:flex!important;
    width:52px!important;
    min-width:52px!important;
    height:52px!important;
    min-height:52px!important;
    flex:0 0 52px!important;
    position:relative!important;
    inset:auto!important;
    margin:0!important;
    border-radius:0!important;
    z-index:4!important;
  }
  .send-button{
    width:52px!important;
    min-width:52px!important;
    height:52px!important;
    min-height:52px!important;
    margin:0!important;
  }
  .voice-recording-bar{
    position:absolute!important;
    left:6px!important;
    right:6px!important;
    bottom:62px!important;
    z-index:25!important;
    min-height:40px!important;
    padding:5px 8px!important;
    margin:0!important;
    box-sizing:border-box!important;
    transform:none!important;
    box-shadow:0 2px 7px rgba(0,0,0,.22)!important;
  }
  .voice-recording-bar.cancel-ready{
    transform:none!important;
  }
  .desktop-voice-label,
  .desktop-voice-spacer,
  .desktop-voice-controls{
    display:none!important;
  }
  .mobile-voice-label{
    display:inline!important;
    font-size:11px;
  }
  .voice-slide-hint{
    display:block!important;
    min-width:0;
    flex:1;
    margin-left:auto;
    text-align:right;
    font-size:10px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}

@media (max-width:360px) and (pointer:coarse){
  .composer-row{
    grid-template-columns:minmax(0,1fr) 48px 48px!important;
  }
  .mobile-voice-button,
  .send-button{
    width:48px!important;
    min-width:48px!important;
    height:50px!important;
    min-height:50px!important;
  }
  .voice-recording-bar{
    bottom:60px!important;
  }
}


/* vAvtobyse 2.7.5 — загрузка чата с конца и история вверх */
.message-list.message-history-initializing{
  visibility:hidden;
}
.message-history-loader{
  position:sticky;
  top:0;
  z-index:6;
  width:max-content;
  max-width:calc(100% - 24px);
  margin:6px auto 10px;
  padding:5px 10px;
  border:1px solid #9bb3c4;
  border-radius:999px;
  background:rgba(244,249,252,.96);
  color:#587083;
  font-size:11px;
  box-shadow:0 1px 3px rgba(0,0,0,.08);
}

/* =========================================================
   vAvtobyse 2.8.0 — Блок 1А1: современный мобильный чат
   ========================================================= */
.composer-input-shell{display:contents}
.mobile-composer-inline{display:none}
.composer-row .mobile-action-hidden{display:none!important}

@media (max-width:820px){
  body{overscroll-behavior:none}
  .active-chat{background:var(--th-chat,#eef3f6)}

  /* Компактная современная шапка диалога */
  .chat-header{
    position:relative!important;
    z-index:20!important;
    min-height:calc(64px + env(safe-area-inset-top))!important;
    grid-template-columns:42px 46px minmax(0,1fr) 42px!important;
    gap:7px!important;
    padding:calc(7px + env(safe-area-inset-top)) 8px 7px!important;
    border:0!important;
    border-bottom:1px solid color-mix(in srgb,var(--th-border,#8baec6) 55%,transparent)!important;
    background:color-mix(in srgb,var(--th-panel,#f8fcff) 94%,transparent)!important;
    box-shadow:0 2px 12px rgba(0,0,0,.12)!important;
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
  }
  .mobile-back-button,
  .chat-info-button{
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    border:0!important;
    border-radius:50%!important;
    padding:0!important;
    background:color-mix(in srgb,var(--th-panel-alt,#edf7fd) 82%,transparent)!important;
    box-shadow:none!important;
  }
  .mobile-back-button img{width:23px!important;height:23px!important}
  .chat-header .avatar-large{
    width:44px!important;
    height:44px!important;
    border-radius:50%!important;
    box-shadow:none!important;
  }
  .chat-title{font-size:16px!important;line-height:20px!important}
  .chat-subtitle{margin-top:1px!important;font-size:11px!important;line-height:15px!important;color:var(--th-muted,#658093)!important}
  .chat-info-image{display:none!important}
  .chat-info-button::before{content:'⋮';font:700 26px/1 Arial,sans-serif;color:var(--th-text,#17384f)}
  .chat-info-button::after{content:none!important}

  /* Сообщения без лишних аватаров, как в современных мессенджерах */
  .message-list{
    padding:12px 9px 10px!important;
    background:
      radial-gradient(circle at 18% 12%,color-mix(in srgb,var(--th-accent,#7db91e) 5%,transparent),transparent 24%),
      var(--th-chat,#eef3f6)!important;
    scroll-padding-bottom:82px;
  }
  .message-row{
    display:flex!important;
    width:100%!important;
    margin:0 0 7px!important;
    gap:0!important;
    align-items:flex-end!important;
  }
  .message-row.mine{justify-content:flex-end!important}
  .message-row:not(.mine){justify-content:flex-start!important}
  .message-row>.avatar{display:none!important}
  .message-content{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    width:auto!important;
    max-width:86%!important;
    min-width:0!important;
  }
  .message-row.mine .message-content{align-items:flex-end!important}
  .message-bubble{
    order:1!important;
    display:block!important;
    width:fit-content!important;
    max-width:100%!important;
    padding:8px 11px!important;
    border:0!important;
    border-radius:17px 17px 17px 5px!important;
    background:var(--th-message,#fff)!important;
    box-shadow:0 1px 2px rgba(0,0,0,.13)!important;
    font-size:15px!important;
    line-height:1.34!important;
  }
  .message-row.mine .message-bubble{
    border-radius:17px 17px 5px 17px!important;
    background:var(--th-message-mine,#d9fdd3)!important;
  }
  .message-meta{
    order:2!important;
    min-height:0!important;
    margin:3px 5px 0!important;
    gap:4px!important;
    font-size:10px!important;
    line-height:12px!important;
    color:var(--th-muted,#658093)!important;
    opacity:.86;
  }
  .message-meta-main{display:flex!important;align-items:center!important;gap:4px!important}
  .message-time{margin-left:0!important;color:inherit!important}
  .message-author{font-size:10px!important;color:var(--th-accent-2,#3978a6)!important}
  .message-row.mine .message-author{display:none!important}
  .message-actions-direct{display:none!important}
  .message-edited{margin-left:0!important;font-size:9px!important}
  .message-day{
    width:max-content!important;
    max-width:80%!important;
    margin:10px auto 13px!important;
    padding:5px 11px!important;
    border-radius:999px!important;
    color:var(--th-text,#17384f)!important;
    background:color-mix(in srgb,var(--th-panel-strong,#dcebf5) 86%,transparent)!important;
    box-shadow:0 1px 2px rgba(0,0,0,.12)!important;
    font-size:11px!important;
    font-weight:700!important;
  }
  .image-message{margin-top:0!important;border:0!important;border-radius:13px!important;max-height:58vh!important}
  .voice-message.voice-player{min-width:min(270px,72vw)!important;border-radius:14px!important}

  /* Нижняя строка ввода: поле + одна автоматически меняющаяся кнопка */
  .composer{
    position:sticky!important;
    bottom:0!important;
    z-index:24!important;
    padding:5px 7px calc(5px + env(safe-area-inset-bottom))!important;
    border-top:1px solid color-mix(in srgb,var(--th-border,#8baec6) 45%,transparent)!important;
    background:color-mix(in srgb,var(--th-panel,#f8fcff) 94%,transparent)!important;
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
  }
  .composer-recipient,.composer-toolbar{display:none!important}
  .composer-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 50px!important;
    gap:6px!important;
    align-items:end!important;
    padding:0!important;
  }
  .composer-input-shell{
    display:grid!important;
    grid-template-columns:40px minmax(0,1fr) 40px!important;
    align-items:end!important;
    min-height:50px!important;
    padding:3px!important;
    border:1px solid color-mix(in srgb,var(--th-border,#8baec6) 75%,transparent)!important;
    border-radius:25px!important;
    background:var(--th-input,#fff)!important;
    box-shadow:0 1px 3px rgba(0,0,0,.09)!important;
  }
  .mobile-composer-inline{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:40px!important;
    min-width:40px!important;
    height:44px!important;
    padding:0!important;
    border:0!important;
    border-radius:50%!important;
    background:transparent!important;
    box-shadow:none!important;
    opacity:.78;
  }
  .mobile-composer-inline:active{background:color-mix(in srgb,var(--th-hover,#dceff9) 75%,transparent)!important}
  .mobile-composer-inline img{width:25px!important;height:25px!important;filter:var(--th-icon-filter,none)!important;pointer-events:none}
  .composer textarea{
    width:100%!important;
    min-height:42px!important;
    max-height:112px!important;
    height:42px;
    margin:0!important;
    padding:10px 2px 8px!important;
    resize:none!important;
    overflow-y:auto!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    box-shadow:none!important;
    font-size:16px!important;
    line-height:22px!important;
  }
  .composer textarea:focus{border:0!important;box-shadow:none!important}
  .mobile-voice-button,.send-button{
    grid-column:2!important;
    grid-row:1!important;
    align-self:end!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:50px!important;
    min-width:50px!important;
    height:50px!important;
    min-height:50px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:50%!important;
    background:linear-gradient(145deg,var(--th-primary-a,#c2ef75),var(--th-primary-b,#7db91e))!important;
    color:var(--th-primary-text,#1a3b03)!important;
    box-shadow:0 2px 7px rgba(0,0,0,.2)!important;
  }
  .mobile-voice-button img,.send-icon-image{width:25px!important;height:25px!important;filter:none!important}
  .send-button{font-size:0!important}
  .composer-row .mobile-action-hidden{display:none!important}
  .pending-file,.reply-preview{
    margin:0 0 5px!important;
    border-radius:13px!important;
    box-shadow:0 1px 3px rgba(0,0,0,.1)!important;
  }
  .emoji-panel{
    left:7px!important;
    right:7px!important;
    bottom:68px!important;
    width:auto!important;
    max-width:none!important;
    max-height:42vh!important;
    border-radius:16px!important;
  }
  .typing-indicator{padding-left:12px!important;font-size:11px!important}

  /* Панель удержания находится над композером и ничего не двигает */
  .voice-recording-bar{
    left:7px!important;
    right:7px!important;
    bottom:66px!important;
    border-radius:16px!important;
    background:var(--th-panel-alt,#edf7fd)!important;
  }
}

@media (max-width:820px) and (pointer:coarse){
  .composer-row{grid-template-columns:minmax(0,1fr) 50px!important}
  .mobile-voice-button,.send-button{
    grid-column:2!important;
    grid-row:1!important;
    position:relative!important;
    inset:auto!important;
    flex:0 0 50px!important;
  }
}

@media (max-width:370px){
  .message-content{max-width:90%!important}
  .composer{padding-left:5px!important;padding-right:5px!important}
  .composer-row{grid-template-columns:minmax(0,1fr) 47px!important;gap:4px!important}
  .composer-input-shell{grid-template-columns:36px minmax(0,1fr) 36px!important}
  .mobile-composer-inline{width:36px!important;min-width:36px!important}
  .mobile-voice-button,.send-button{width:47px!important;min-width:47px!important;height:47px!important;min-height:47px!important}
}

/* =========================================================
   vAvtobyse 2.8.3 — Блок 1Б: современный мобильный список
   ========================================================= */
.mobile-sidebar-title,.mobile-header-new-chat,.conversation-list-time,.conversation-mobile-presence{display:none}

@media (max-width:820px){
  .contacts-window{
    background:var(--th-panel,#f7fafc)!important;
  }
  .contacts-window>.titlebar{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    height:calc(62px + env(safe-area-inset-top))!important;
    min-height:calc(62px + env(safe-area-inset-top))!important;
    padding:calc(8px + env(safe-area-inset-top)) 12px 8px!important;
    border:0!important;
    border-bottom:1px solid color-mix(in srgb,var(--th-border,#8baec6) 48%,transparent)!important;
    background:color-mix(in srgb,var(--th-panel,#f8fcff) 95%,transparent)!important;
    box-shadow:0 2px 12px rgba(0,0,0,.1)!important;
    color:var(--th-text,#17384f)!important;
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
  }
  .contacts-window>.titlebar .desktop-app-name,
  .contacts-window>.titlebar>.qip-logo{display:none!important}
  .mobile-sidebar-title{
    display:block!important;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font:700 21px/1.1 Arial,sans-serif!important;
    letter-spacing:-.02em;
  }
  .mobile-account-button{
    display:grid!important;
    place-items:center!important;
    width:42px!important;
    min-width:42px!important;
    height:42px!important;
    min-height:42px!important;
    padding:0!important;
    border:0!important;
    border-radius:50%!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  .mobile-account-button .avatar{
    width:42px!important;
    height:42px!important;
    border-radius:50%!important;
    font-size:21px!important;
    box-shadow:0 0 0 2px color-mix(in srgb,var(--th-accent,#7db91e) 28%,transparent)!important;
  }
  .mobile-header-new-chat{
    display:grid!important;
    place-items:center!important;
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    padding:0!important;
    border:0!important;
    border-radius:50%!important;
    background:color-mix(in srgb,var(--th-panel-alt,#edf7fd) 86%,transparent)!important;
    box-shadow:none!important;
  }
  .mobile-header-new-chat img{width:23px!important;height:23px!important;filter:var(--th-icon-filter,none)!important}
  #installBtn{display:none!important}

  /* На телефоне режим выбирается нижней навигацией, верхние ретро-вкладки не нужны */
  .list-heading{display:none!important}
  .conversation-list{
    padding:0 0 8px!important;
    background:var(--th-panel,#f7fafc)!important;
    overscroll-behavior:contain;
  }
  .conversation-section-label{
    position:sticky;
    top:0;
    z-index:4;
    padding:8px 15px 5px!important;
    border:0!important;
    background:color-mix(in srgb,var(--th-panel,#f7fafc) 94%,transparent)!important;
    color:var(--th-muted,#6f8290)!important;
    font-size:10px!important;
    letter-spacing:.08em!important;
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
  }
  .conversation-item{
    position:relative!important;
    min-height:74px!important;
    grid-template-columns:56px minmax(0,1fr) auto!important;
    gap:10px!important;
    padding:8px 12px!important;
    border:0!important;
    border-bottom:1px solid color-mix(in srgb,var(--th-border,#8baec6) 30%,transparent)!important;
    border-radius:0!important;
    background:var(--th-panel,#f7fafc)!important;
    color:var(--th-text,#17384f)!important;
    outline:0!important;
    -webkit-tap-highlight-color:transparent;
  }
  .conversation-item:active,
  .conversation-item:hover,
  .conversation-item.selected{
    background:var(--th-hover,#eaf4f9)!important;
    color:var(--th-text,#17384f)!important;
    outline:0!important;
  }
  .conversation-avatar-shell{
    position:relative;
    width:54px;
    height:54px;
    align-self:center;
  }
  .conversation-avatar-shell>.avatar{
    width:54px!important;
    height:54px!important;
    border-radius:50%!important;
    font-size:25px!important;
    box-shadow:none!important;
  }
  .conversation-main{align-self:center;min-width:0}
  .conversation-title-row{
    display:flex!important;
    align-items:center!important;
    min-width:0!important;
    gap:6px!important;
  }
  .conversation-title{
    flex:1 1 auto!important;
    min-width:0!important;
    font:700 15px/19px Arial,sans-serif!important;
    color:var(--th-text,#17384f)!important;
  }
  .conversation-list-time{
    display:inline;
    flex:0 0 auto;
    color:var(--th-muted,#738592);
    font:11px/16px Arial,sans-serif;
    white-space:nowrap;
  }
  .conversation-bus-presence{display:none!important}
  .conversation-pinned-mark{
    order:3;
    font-size:11px!important;
    opacity:.58;
    filter:none!important;
  }
  .conversation-preview{
    display:block!important;
    margin-top:3px!important;
    color:var(--th-muted,#6f8290)!important;
    font:13px/17px Arial,sans-serif!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .conversation-preview.has-draft{color:#d45b52!important}
  .conversation-trailing{
    align-self:center!important;
    min-width:30px!important;
    gap:5px!important;
  }
  .conversation-pin-button{
    width:28px!important;
    min-width:28px!important;
    height:25px!important;
    border:0!important;
    border-radius:50%!important;
    background:transparent!important;
    opacity:.35!important;
    font-size:13px!important;
    box-shadow:none!important;
  }
  .conversation-pin-button.active{opacity:.78!important;background:color-mix(in srgb,var(--th-accent,#7db91e) 14%,transparent)!important}
  .unread-badge{
    min-width:22px!important;
    height:22px!important;
    padding:0 6px!important;
    border:0!important;
    border-radius:999px!important;
    background:var(--th-accent,#5ea5d8)!important;
    color:#fff!important;
    box-shadow:none!important;
    font:700 11px/22px Arial,sans-serif!important;
  }
  .contact-item .conversation-preview{color:var(--th-muted,#6f8290)!important}
  .contact-open-icon{font:26px/1 Arial,sans-serif!important;color:var(--th-muted,#788b98)!important}
  .empty-list{
    padding:36px 20px!important;
    color:var(--th-muted,#6f8290)!important;
    font:14px/1.45 Arial,sans-serif!important;
  }

  /* Современная нижняя навигация */
  .mobile-bottom-nav{
    height:calc(66px + env(safe-area-inset-bottom))!important;
    padding:5px 7px env(safe-area-inset-bottom)!important;
    gap:4px!important;
    border:0!important;
    border-top:1px solid color-mix(in srgb,var(--th-border,#8baec6) 42%,transparent)!important;
    background:color-mix(in srgb,var(--th-panel,#f8fcff) 96%,transparent)!important;
    box-shadow:0 -3px 14px rgba(0,0,0,.08)!important;
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
  }
  .mobile-nav-button{
    min-height:56px!important;
    grid-template-rows:27px 18px!important;
    gap:2px!important;
    padding:3px 2px!important;
    border:0!important;
    border-radius:13px!important;
    background:transparent!important;
    color:var(--th-muted,#6f8290)!important;
    box-shadow:none!important;
    outline:0!important;
  }
  .mobile-nav-button img{width:25px!important;height:25px!important;filter:var(--th-icon-filter,none)!important;opacity:.72}
  .mobile-nav-button span{font:11px/14px Arial,sans-serif!important}
  .mobile-nav-button.active{
    background:color-mix(in srgb,var(--th-accent,#5ea5d8) 13%,transparent)!important;
    color:var(--th-accent-2,#3978a6)!important;
  }
  .mobile-nav-button.active img{opacity:1!important}
  .contacts-window{padding-bottom:calc(66px + env(safe-area-inset-bottom))!important}
}

@media (max-width:370px){
  .conversation-item{grid-template-columns:50px minmax(0,1fr) auto!important;padding-left:8px!important;padding-right:8px!important}
  .conversation-avatar-shell,.conversation-avatar-shell>.avatar{width:48px!important;height:48px!important}
  .conversation-title{font-size:14px!important}
  .conversation-preview{font-size:12px!important}
  .mobile-sidebar-title{font-size:19px!important}
}

/* =========================================================
   vAvtobyse 2.8.3 — Блок 1В: удобный интерфейс ПК
   Современная компоновка + собственный ретро-стиль «Автобус в прошлое»
   ========================================================= */
@media (min-width:821px){
  html,body{height:100%;overflow:hidden}
  body{
    background:var(--th-body)!important;
  }
  .app{
    height:100dvh!important;
    grid-template-columns:354px minmax(0,1fr)!important;
    gap:8px!important;
    padding:8px!important;
    background:transparent!important;
  }
  .contacts-window,.chat-window{
    border:1px solid color-mix(in srgb,var(--th-border,#8baec6) 78%,#151515)!important;
    border-radius:8px!important;
    background:var(--th-panel,#f8fcff)!important;
    box-shadow:0 14px 40px rgba(0,0,0,.26)!important;
  }

  /* Заголовки окон: классика, но без лишней тяжести */
  .contacts-window>.titlebar,.chat-window>.titlebar{
    height:42px!important;
    min-height:42px!important;
    padding:0 10px!important;
    border:0!important;
    border-bottom:1px solid color-mix(in srgb,var(--th-border,#8baec6) 70%,#111)!important;
    border-radius:7px 7px 0 0!important;
    background:
      linear-gradient(180deg,color-mix(in srgb,var(--th-title-a,#75b2d8) 86%,#fff 14%),var(--th-title-b,#356f9b))!important;
    color:var(--th-title-text,#fff)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.32)!important;
    text-shadow:0 1px 0 rgba(0,0,0,.28)!important;
  }
  .contacts-window>.titlebar>.qip-logo{
    width:29px!important;height:29px!important;min-width:29px!important;
    border:1px solid rgba(255,255,255,.72)!important;
    border-radius:6px!important;
    background:url('../icons/icon-192.png?v=2.8.3') center/cover no-repeat!important;
    color:transparent!important;font-size:0!important;
    box-shadow:0 1px 3px rgba(0,0,0,.25)!important;
  }
  .chat-window>.titlebar>.qip-logo{
    width:27px!important;height:27px!important;min-width:27px!important;
    border-radius:6px!important;
    background:color-mix(in srgb,var(--th-accent,#e2a51b) 84%,#fff)!important;
    color:#151515!important;text-shadow:none!important;font-size:15px!important;
  }
  .desktop-app-name{font-size:14px!important;letter-spacing:.01em}
  .version-mark{
    display:inline-block;padding:2px 5px;margin-left:4px;border-radius:4px;
    background:rgba(0,0,0,.24);color:#fff;font-size:9px;line-height:12px;
    vertical-align:1px;text-shadow:none;
  }

  /* Левая колонка */
  .action-toolbar{
    height:58px!important;min-height:58px!important;
    display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;
    gap:4px!important;padding:5px 6px!important;
    border:0!important;border-bottom:1px solid color-mix(in srgb,var(--th-border,#8baec6) 50%,transparent)!important;
    background:var(--th-panel-alt,#edf7fd)!important;
  }
  .desktop-utility{display:grid!important}
  .action-button{
    width:auto!important;height:47px!important;min-height:47px!important;
    grid-template-rows:25px 12px!important;gap:1px!important;
    padding:3px 2px!important;
    border:1px solid transparent!important;border-radius:6px!important;
    background:transparent!important;box-shadow:none!important;
    color:var(--th-text,#17384f)!important;
  }
  .action-button:hover{
    border-color:color-mix(in srgb,var(--th-border,#8baec6) 78%,transparent)!important;
    background:var(--th-hover,#eaf4f9)!important;
  }
  .action-button .button-icon{width:23px!important;height:23px!important;filter:var(--th-icon-filter,none)!important}
  .action-button .button-label{font-size:9px!important;line-height:11px!important;color:var(--th-muted,#657b8a)!important}
  .notification-dot{right:7px!important;top:5px!important}

  .profile-card{
    min-height:68px!important;padding:8px 10px!important;
    grid-template-columns:50px minmax(0,1fr)!important;gap:9px!important;
    border:0!important;border-bottom:1px solid color-mix(in srgb,var(--th-border,#8baec6) 40%,transparent)!important;
    background:var(--th-panel,#f8fcff)!important;
  }
  .profile-card .avatar-large{width:48px!important;height:48px!important;border-radius:50%!important}
  .profile-name{font-size:14px!important;color:var(--th-text,#17384f)!important}
  .online-line,.activity-line,.id-line{font-size:10px!important;line-height:14px!important;color:var(--th-muted,#657b8a)!important}

  .id-search-box{
    padding:7px 9px!important;border:0!important;
    border-bottom:1px solid color-mix(in srgb,var(--th-border,#8baec6) 40%,transparent)!important;
    background:var(--th-panel-alt,#edf7fd)!important;
  }
  .id-search-box label{display:none!important}
  .inline-control{grid-template-columns:minmax(0,1fr) 39px!important;gap:5px!important}
  .id-search-box .qip-input{height:38px!important;padding:7px 10px!important;border-radius:7px!important}
  .id-search-box .primary{
    width:39px!important;min-width:39px!important;height:38px!important;min-height:38px!important;
    padding:0!important;border-radius:7px!important;font-size:0!important;
  }
  .id-search-box .primary .inline-icon{width:20px!important;height:20px!important;margin:0!important}
  .id-search-box .primary span{display:none!important}

  .list-heading{
    min-height:43px!important;padding:4px 6px!important;
    grid-template-columns:minmax(0,1fr) 34px!important;gap:5px!important;
    border:0!important;border-bottom:1px solid color-mix(in srgb,var(--th-border,#8baec6) 48%,transparent)!important;
    background:var(--th-panel,#f8fcff)!important;
  }
  .sidebar-tabs{gap:4px!important}
  .sidebar-tab{
    height:34px!important;padding:3px 8px!important;
    border:1px solid transparent!important;border-radius:6px!important;
    background:transparent!important;color:var(--th-muted,#657b8a)!important;
    outline:0!important;box-shadow:none!important;
  }
  .sidebar-tab img{width:18px!important;height:18px!important;filter:var(--th-icon-filter,none)!important}
  .sidebar-tab b{
    min-width:20px!important;padding:1px 5px!important;border:0!important;border-radius:999px!important;
    background:color-mix(in srgb,var(--th-border,#8baec6) 22%,transparent)!important;
    color:var(--th-text,#17384f)!important;line-height:16px!important;
  }
  .sidebar-tab.active{
    background:color-mix(in srgb,var(--th-accent,#e2a51b) 18%,var(--th-panel,#f8fcff))!important;
    color:var(--th-text,#17384f)!important;
    border-color:color-mix(in srgb,var(--th-accent,#e2a51b) 44%,transparent)!important;
  }
  .sidebar-tab.active img{filter:var(--th-icon-filter,none)!important}
  .mini-refresh{
    width:34px!important;height:34px!important;padding:6px!important;
    border:1px solid transparent!important;border-radius:6px!important;
    background:transparent!important;box-shadow:none!important;
  }
  .mini-refresh:hover{background:var(--th-hover,#eaf4f9)!important;border-color:var(--th-border,#8baec6)!important}

  .conversation-list{padding:4px!important;background:var(--th-panel,#f8fcff)!important}
  .conversation-section-label{
    position:sticky;top:0;z-index:3;padding:7px 8px 5px!important;
    border:0!important;background:color-mix(in srgb,var(--th-panel,#f8fcff) 94%,transparent)!important;
    color:var(--th-muted,#657b8a)!important;font-size:9px!important;letter-spacing:.09em!important;
    backdrop-filter:blur(8px);
  }
  .conversation-item{
    min-height:64px!important;grid-template-columns:46px minmax(0,1fr) auto!important;
    gap:9px!important;padding:7px 8px!important;margin:0 0 2px!important;
    border:1px solid transparent!important;border-radius:7px!important;
    background:transparent!important;color:var(--th-text,#17384f)!important;
    outline:0!important;
  }
  .conversation-item:hover{background:var(--th-hover,#eaf4f9)!important;border-color:color-mix(in srgb,var(--th-border,#8baec6) 45%,transparent)!important}
  .conversation-item.selected{
    background:color-mix(in srgb,var(--th-accent,#e2a51b) 18%,var(--th-panel,#f8fcff))!important;
    border-color:color-mix(in srgb,var(--th-accent,#e2a51b) 52%,transparent)!important;
    color:var(--th-text,#17384f)!important;outline:0!important;
  }
  .conversation-avatar-shell{position:relative;width:44px;height:44px}
  .conversation-avatar-shell>.avatar,.conversation-item>.avatar{
    width:44px!important;height:44px!important;border-radius:50%!important;font-size:21px!important;
  }
  .conversation-mobile-presence{display:none!important}
  .conversation-title-row{display:flex!important;align-items:center!important;gap:6px!important;min-width:0!important}
  .conversation-title{flex:1 1 auto!important;min-width:0!important;font-size:13px!important;color:var(--th-text,#17384f)!important}
  .conversation-list-time{display:inline!important;flex:0 0 auto;color:var(--th-muted,#657b8a)!important;font-size:9px!important;white-space:nowrap}
  .conversation-preview{margin-top:4px!important;font-size:10px!important;color:var(--th-muted,#657b8a)!important}
  .conversation-item.selected .conversation-preview{color:var(--th-muted,#657b8a)!important}
  .conversation-trailing{align-self:center!important;gap:4px!important}
  .conversation-pin-button{
    width:25px!important;height:25px!important;min-width:25px!important;
    border:0!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important;opacity:.35!important;
  }
  .conversation-pin-button:hover,.conversation-pin-button.active{opacity:.85!important;background:color-mix(in srgb,var(--th-accent,#e2a51b) 16%,transparent)!important}
  .unread-badge{
    min-width:21px!important;height:21px!important;padding:0 6px!important;border:0!important;border-radius:999px!important;
    background:var(--th-accent,#e2a51b)!important;color:#17120a!important;box-shadow:none!important;
    font:700 10px/21px Tahoma,Arial,sans-serif!important;
  }
  .statusbar{
    height:27px!important;padding:0 8px!important;border:0!important;
    border-top:1px solid color-mix(in srgb,var(--th-border,#8baec6) 42%,transparent)!important;
    background:var(--th-panel-alt,#edf7fd)!important;color:var(--th-muted,#657b8a)!important;
  }

  /* Правая колонка — рабочее пространство */
  .chat-window>.titlebar{font-size:12px!important}
  .chat-header{
    min-height:62px!important;padding:7px 11px!important;
    grid-template-columns:46px minmax(0,1fr) auto!important;gap:10px!important;
    border:0!important;border-bottom:1px solid color-mix(in srgb,var(--th-border,#8baec6) 45%,transparent)!important;
    background:var(--th-panel,#f8fcff)!important;
  }
  .chat-header .avatar-large{width:44px!important;height:44px!important;border-radius:50%!important}
  .chat-title{font-size:14px!important;color:var(--th-text,#17384f)!important}
  .chat-subtitle{margin-top:3px!important;font-size:10px!important;color:var(--th-muted,#657b8a)!important}
  .chat-info-button{
    min-width:auto!important;height:37px!important;min-height:37px!important;padding:0 10px!important;
    border-radius:7px!important;background:var(--th-panel-alt,#edf7fd)!important;box-shadow:none!important;
  }
  .chat-info-image{width:20px!important;height:20px!important}
  .chat-info-text{font-size:11px!important}
  .group-pinned-banner{margin:5px 8px 0!important;border-radius:7px!important}
  .typing-indicator{padding:4px 14px!important;font-size:10px!important}

  .message-list{
    padding:16px clamp(18px,3vw,46px)!important;
    background:
      linear-gradient(color-mix(in srgb,var(--th-chat,#f6fbfe) 94%,transparent),color-mix(in srgb,var(--th-chat,#f6fbfe) 94%,transparent)),
      repeating-linear-gradient(135deg,transparent 0 14px,color-mix(in srgb,var(--th-border,#8baec6) 5%,transparent) 14px 15px)!important;
    scroll-behavior:smooth;
  }
  .message-row{max-width:1100px;margin-left:auto!important;margin-right:auto!important;grid-template-columns:34px minmax(0,1fr)!important;gap:8px!important}
  .message-row .avatar{width:32px!important;height:32px!important;border-radius:50%!important}
  .message-bubble{
    max-width:min(760px,82%)!important;padding:8px 10px!important;
    border:1px solid color-mix(in srgb,var(--th-border,#8baec6) 62%,transparent)!important;
    border-radius:8px!important;background:var(--th-message,#fff)!important;
    box-shadow:0 2px 7px rgba(0,0,0,.06)!important;
  }
  .message-row.mine .message-bubble{
    background:var(--th-message-mine,#eef9dd)!important;
    border-color:color-mix(in srgb,var(--th-accent,#e2a51b) 36%,var(--th-border,#8baec6))!important;
  }
  .message-day{
    width:max-content;margin:8px auto 14px!important;padding:4px 9px!important;
    border:1px solid color-mix(in srgb,var(--th-border,#8baec6) 40%,transparent)!important;
    border-radius:999px!important;background:color-mix(in srgb,var(--th-panel,#f8fcff) 90%,transparent)!important;
    color:var(--th-muted,#657b8a)!important;font-size:9px!important;
  }

  /* Нижняя панель: компактно, всё на своём месте */
  .composer{
    border:0!important;border-top:1px solid color-mix(in srgb,var(--th-border,#8baec6) 52%,transparent)!important;
    background:var(--th-panel,#f8fcff)!important;
  }
  .composer-recipient{
    min-height:28px!important;padding:4px 9px!important;border:0!important;
    border-bottom:1px solid color-mix(in srgb,var(--th-border,#8baec6) 30%,transparent)!important;
    background:var(--th-panel-alt,#edf7fd)!important;font-size:10px!important;
  }
  .composer-recipient .recipient-avatar{width:20px!important;height:20px!important;font-size:11px!important}
  .composer-toolbar{
    min-height:41px!important;padding:4px 8px!important;gap:4px!important;
    border:0!important;background:var(--th-panel,#f8fcff)!important;
  }
  .composer-toolbar .tool-button{
    width:34px!important;height:33px!important;padding:5px!important;
    border:1px solid transparent!important;border-radius:6px!important;background:transparent!important;box-shadow:none!important;
  }
  .composer-toolbar .tool-button:hover{background:var(--th-hover,#eaf4f9)!important;border-color:var(--th-border,#8baec6)!important}
  .composer-toolbar .button-icon{width:21px!important;height:21px!important}
  .composer-tip{font-size:9px!important;color:var(--th-muted,#657b8a)!important}
  .composer-row{
    grid-template-columns:minmax(0,1fr) 104px!important;gap:7px!important;padding:0 8px 8px!important;
    align-items:stretch!important;
  }
  .composer-input-shell{display:block!important}
  .composer textarea{
    width:100%!important;min-height:50px!important;max-height:130px!important;padding:10px 11px!important;
    border:1px solid var(--th-border,#8baec6)!important;border-radius:8px!important;
    background:var(--th-input,#fff)!important;color:var(--th-text,#17384f)!important;
    resize:none!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.06)!important;
  }
  .mobile-composer-inline,.mobile-voice-button{display:none!important}
  .send-button{
    width:104px!important;min-width:104px!important;min-height:50px!important;height:auto!important;
    padding:0 12px!important;border-radius:8px!important;
    background:linear-gradient(180deg,color-mix(in srgb,var(--th-accent,#e2a51b) 76%,#fff),var(--th-accent,#e2a51b))!important;
    border:1px solid color-mix(in srgb,var(--th-accent,#e2a51b) 65%,#1b1b1b)!important;
    color:#17120a!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.55)!important;
  }
  .send-button:hover{filter:brightness(1.04)}
  .send-icon-image{width:21px!important;height:21px!important}
  .send-text{display:inline!important;font-size:11px!important}
  .voice-recording-bar{
    margin:0 8px 5px!important;border-radius:7px!important;
    background:color-mix(in srgb,var(--th-panel-alt,#edf7fd) 88%,transparent)!important;
  }
  .emoji-panel{bottom:102px!important;border-radius:8px!important}
}

@media (min-width:821px) and (max-width:1100px){
  .app{grid-template-columns:320px minmax(0,1fr)!important}
  .action-toolbar{grid-template-columns:repeat(5,minmax(0,1fr))!important;height:auto!important;min-height:108px!important}
  .desktop-utility{display:none!important}
  .message-list{padding-left:16px!important;padding-right:16px!important}
}

/* =========================================================
   vAvtobyse 2.8.3 — возврат фирменного ретро-стиля
   Сохраняем современную компоновку 1А1/1Б/1В, но не копируем
   визуальный язык Telegram: прямые рамки, пиксельные детали,
   классические градиенты и палитра «Автобус в прошлое».
   ========================================================= */

/* Общие фирменные детали */
html[data-theme] .message-history-loader{
  border-radius:3px!important;
  border:1px solid var(--th-border)!important;
  background:linear-gradient(var(--th-button-a),var(--th-button-b))!important;
  color:var(--th-text)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),1px 1px 0 rgba(0,0,0,.16)!important;
  font-family:Tahoma,Verdana,Arial,sans-serif!important;
}

@media (max-width:820px){
  /* 1А1: удобная компоновка чата + фирменная ретро-оболочка */
  .chat-header{
    min-height:calc(58px + env(safe-area-inset-top))!important;
    grid-template-columns:38px 42px minmax(0,1fr) 38px!important;
    gap:7px!important;
    padding:calc(6px + env(safe-area-inset-top)) 7px 6px!important;
    border:0!important;
    border-bottom:2px groove var(--th-border,#8baec6)!important;
    background:linear-gradient(var(--th-title-a,#75b2d8),var(--th-title-b,#356f9b))!important;
    color:var(--th-title-text,#fff)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 2px 0 rgba(0,0,0,.18)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  .chat-header .chat-title,
  .chat-header .chat-subtitle,
  .chat-header .bus-presence-label{color:var(--th-title-text,#fff)!important;text-shadow:0 1px 0 rgba(0,0,0,.28)!important}
  .chat-header .chat-subtitle{opacity:.86}
  .mobile-back-button,.chat-info-button{
    width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;
    padding:0!important;
    border:1px solid color-mix(in srgb,var(--th-title-text,#fff) 48%,var(--th-border,#8baec6))!important;
    border-radius:3px!important;
    background:linear-gradient(color-mix(in srgb,var(--th-title-a,#75b2d8) 65%,#fff),var(--th-title-b,#356f9b))!important;
    color:var(--th-title-text,#fff)!important;
    box-shadow:inset 1px 1px 0 rgba(255,255,255,.35),inset -1px -1px 0 rgba(0,0,0,.18)!important;
  }
  .mobile-back-button:active,.chat-info-button:active{box-shadow:inset 1px 1px 2px rgba(0,0,0,.35)!important}
  .mobile-back-button img{filter:brightness(0) invert(1)!important}
  .chat-info-button::before{color:var(--th-title-text,#fff)!important;font-family:Tahoma,Verdana,Arial,sans-serif!important;font-size:22px!important}
  .chat-header .avatar-large{
    width:40px!important;height:40px!important;
    border:1px solid color-mix(in srgb,var(--th-title-text,#fff) 65%,var(--th-border,#8baec6))!important;
    border-radius:4px!important;
    box-shadow:inset 0 0 0 2px rgba(255,255,255,.48),1px 1px 0 rgba(0,0,0,.2)!important;
  }

  .message-list{
    padding:10px 8px!important;
    background:
      linear-gradient(color-mix(in srgb,var(--th-chat,#f6fbfe) 96%,transparent),color-mix(in srgb,var(--th-chat,#f6fbfe) 96%,transparent)),
      repeating-linear-gradient(0deg,transparent 0 19px,color-mix(in srgb,var(--th-border,#8baec6) 8%,transparent) 19px 20px)!important;
  }
  .message-content{max-width:88%!important}
  .message-bubble{
    padding:7px 9px!important;
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    background:var(--th-message,#fff)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.38),1px 1px 2px rgba(0,0,0,.10)!important;
    font-family:Tahoma,Verdana,Arial,sans-serif!important;
    font-size:14px!important;
    line-height:1.4!important;
  }
  .message-row.mine .message-bubble{
    border-radius:3px!important;
    border-color:var(--th-accent,#7db91e)!important;
    background:var(--th-message-mine,#eef9dd)!important;
  }
  .message-meta{font-family:Tahoma,Verdana,Arial,sans-serif!important;margin:3px 2px 0!important}
  .message-day{
    margin:9px auto 12px!important;
    padding:4px 9px!important;
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-button-b,#dcebf5))!important;
    color:var(--th-text,#17384f)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.45),1px 1px 0 rgba(0,0,0,.12)!important;
    font-family:Tahoma,Verdana,Arial,sans-serif!important;
  }
  .image-message{border:1px solid var(--th-border,#8baec6)!important;border-radius:3px!important}
  .voice-message.voice-player{border-radius:3px!important}

  .composer{
    padding:5px 6px calc(5px + env(safe-area-inset-bottom))!important;
    border-top:2px groove var(--th-border,#8baec6)!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-panel-strong,#dcebf5))!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  .composer-input-shell{
    grid-template-columns:38px minmax(0,1fr) 38px!important;
    min-height:48px!important;
    padding:2px!important;
    border:2px inset color-mix(in srgb,var(--th-border,#8baec6) 68%,#fff)!important;
    border-radius:3px!important;
    background:var(--th-input,#fff)!important;
    box-shadow:none!important;
  }
  .mobile-composer-inline{
    width:38px!important;min-width:38px!important;height:42px!important;
    border:1px solid transparent!important;
    border-radius:2px!important;
  }
  .mobile-composer-inline:active{
    border-color:var(--th-border,#8baec6)!important;
    background:linear-gradient(var(--th-button-b,#dcebf5),var(--th-button-a,#fff))!important;
  }
  .mobile-composer-inline img{width:23px!important;height:23px!important}
  .composer textarea{
    min-height:40px!important;height:40px;
    padding:9px 3px 7px!important;
    font-family:Tahoma,Verdana,Arial,sans-serif!important;
    font-size:15px!important;
  }
  .mobile-voice-button,.send-button{
    width:48px!important;min-width:48px!important;height:48px!important;min-height:48px!important;
    border:1px solid var(--th-accent,#7db91e)!important;
    border-radius:4px!important;
    background:linear-gradient(var(--th-primary-a,#c2ef75),var(--th-primary-b,#7db91e))!important;
    box-shadow:inset 1px 1px 0 rgba(255,255,255,.64),inset -1px -1px 0 rgba(0,0,0,.18)!important;
  }
  .mobile-voice-button:active,.send-button:active{box-shadow:inset 1px 1px 3px rgba(0,0,0,.36)!important}
  .pending-file,.reply-preview{border-radius:3px!important;box-shadow:none!important}
  .emoji-panel{
    border:2px outset color-mix(in srgb,var(--th-border,#8baec6) 65%,#fff)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-panel-alt,#edf7fd))!important;
  }
  .voice-recording-bar{
    border:2px outset color-mix(in srgb,var(--th-border,#8baec6) 65%,#fff)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-panel-strong,#dcebf5))!important;
    box-shadow:2px 2px 0 rgba(0,0,0,.18)!important;
  }

  /* 1Б: современная структура списков + ретро-оформление */
  .contacts-window{background:var(--th-panel,#f7fafc)!important}
  .contacts-window>.titlebar{
    height:calc(54px + env(safe-area-inset-top))!important;
    min-height:calc(54px + env(safe-area-inset-top))!important;
    padding:calc(6px + env(safe-area-inset-top)) 8px 6px!important;
    border:0!important;
    border-bottom:2px groove var(--th-border,#8baec6)!important;
    background:linear-gradient(var(--th-title-a,#75b2d8),var(--th-title-b,#356f9b))!important;
    color:var(--th-title-text,#fff)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.34),0 2px 0 rgba(0,0,0,.18)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  .mobile-sidebar-title{
    font:700 18px/1.15 Tahoma,Verdana,Arial,sans-serif!important;
    letter-spacing:0!important;
    color:var(--th-title-text,#fff)!important;
    text-shadow:0 1px 0 rgba(0,0,0,.3)!important;
  }
  .mobile-account-button{
    width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;
    border:1px solid color-mix(in srgb,var(--th-title-text,#fff) 55%,var(--th-border,#8baec6))!important;
    border-radius:4px!important;
    background:linear-gradient(color-mix(in srgb,var(--th-title-a,#75b2d8) 65%,#fff),var(--th-title-b,#356f9b))!important;
    box-shadow:inset 1px 1px 0 rgba(255,255,255,.35),inset -1px -1px 0 rgba(0,0,0,.18)!important;
  }
  .mobile-account-button .avatar{
    width:36px!important;height:36px!important;
    border-radius:3px!important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.52)!important;
  }
  .mobile-header-new-chat{
    width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important;
    border:1px solid color-mix(in srgb,var(--th-title-text,#fff) 50%,var(--th-border,#8baec6))!important;
    border-radius:3px!important;
    background:linear-gradient(color-mix(in srgb,var(--th-title-a,#75b2d8) 65%,#fff),var(--th-title-b,#356f9b))!important;
    box-shadow:inset 1px 1px 0 rgba(255,255,255,.35),inset -1px -1px 0 rgba(0,0,0,.18)!important;
  }
  .mobile-header-new-chat img{filter:brightness(0) invert(1)!important}

  .conversation-list{padding:4px 5px 7px!important;background:var(--th-panel,#f7fafc)!important}
  .conversation-section-label{
    padding:6px 7px 4px!important;
    border-bottom:1px dotted var(--th-border,#8baec6)!important;
    background:var(--th-panel-alt,#edf7fd)!important;
    color:var(--th-muted,#6f8290)!important;
    font-family:Tahoma,Verdana,Arial,sans-serif!important;
    font-size:9px!important;
    letter-spacing:.06em!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  .conversation-item{
    min-height:68px!important;
    grid-template-columns:50px minmax(0,1fr) auto!important;
    gap:8px!important;
    margin:0 0 3px!important;
    padding:7px 7px!important;
    border:1px solid color-mix(in srgb,var(--th-border,#8baec6) 50%,transparent)!important;
    border-radius:3px!important;
    background:linear-gradient(color-mix(in srgb,var(--th-panel,#f7fafc) 97%,#fff),var(--th-panel,#f7fafc))!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.26)!important;
  }
  .conversation-item:hover,.conversation-item:active{
    border-color:var(--th-border,#8baec6)!important;
    background:var(--th-hover,#eaf4f9)!important;
  }
  .conversation-item.selected{
    border-color:var(--th-accent,#7db91e)!important;
    background:color-mix(in srgb,var(--th-panel-alt,#edf7fd) 78%,var(--th-accent,#7db91e) 22%)!important;
    outline:1px dotted color-mix(in srgb,var(--th-accent,#7db91e) 72%,transparent)!important;
    outline-offset:-3px!important;
  }
  .conversation-avatar-shell{width:48px!important;height:48px!important}
  .conversation-avatar-shell>.avatar{
    width:48px!important;height:48px!important;
    border-radius:5px!important;
    font-size:23px!important;
    box-shadow:inset 0 0 0 2px rgba(255,255,255,.48)!important;
  }
  .conversation-mobile-presence{display:none!important}
  .conversation-bus-presence{display:inline-flex!important;transform:scale(.82);transform-origin:center right}
  .conversation-title{font:700 14px/18px Tahoma,Verdana,Arial,sans-serif!important}
  .conversation-list-time{font:10px/15px Tahoma,Verdana,Arial,sans-serif!important}
  .conversation-preview{font:11px/16px Tahoma,Verdana,Arial,sans-serif!important}
  .conversation-pin-button{
    width:27px!important;min-width:27px!important;height:25px!important;
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-button-b,#dcebf5))!important;
    opacity:.66!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.4)!important;
  }
  .conversation-pin-button.active{opacity:1!important;background:linear-gradient(var(--th-primary-a,#c2ef75),var(--th-primary-b,#7db91e))!important}
  .unread-badge{
    min-width:21px!important;height:20px!important;padding:0 5px!important;
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-primary-a,#c2ef75),var(--th-primary-b,#7db91e))!important;
    color:var(--th-primary-text,#1a3b03)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.5)!important;
    font:700 10px/18px Tahoma,Verdana,Arial,sans-serif!important;
  }
  .contact-open-icon{font-family:Tahoma,Verdana,Arial,sans-serif!important;font-size:20px!important}
  .empty-list{font-family:Tahoma,Verdana,Arial,sans-serif!important}

  .mobile-bottom-nav{
    height:calc(61px + env(safe-area-inset-bottom))!important;
    padding:4px 5px env(safe-area-inset-bottom)!important;
    gap:4px!important;
    border:0!important;
    border-top:2px groove var(--th-border,#8baec6)!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-panel-strong,#dcebf5))!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  .mobile-nav-button{
    min-height:52px!important;
    grid-template-rows:25px 17px!important;
    gap:1px!important;
    padding:3px 2px!important;
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-button-b,#dcebf5))!important;
    color:var(--th-text,#17384f)!important;
    box-shadow:inset 1px 1px 0 rgba(255,255,255,.45),inset -1px -1px 0 rgba(0,0,0,.1)!important;
  }
  .mobile-nav-button.active{
    border-color:var(--th-accent,#7db91e)!important;
    background:linear-gradient(var(--th-primary-a,#c2ef75),var(--th-primary-b,#7db91e))!important;
    color:var(--th-primary-text,#1a3b03)!important;
    box-shadow:inset 1px 1px 2px rgba(0,0,0,.2)!important;
  }
  .mobile-nav-button img{width:23px!important;height:23px!important;opacity:1!important}
  .mobile-nav-button span{font:10px/13px Tahoma,Verdana,Arial,sans-serif!important}
  .contacts-window{padding-bottom:calc(61px + env(safe-area-inset-bottom))!important}
}

@media (min-width:821px){
  /* 1В: современная двухколоночная логика + фирменная оболочка окон */
  .app{gap:7px!important;padding:7px!important}
  .contacts-window,.chat-window{
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:5px 5px 3px 3px!important;
    background:var(--th-panel,#f8fcff)!important;
    box-shadow:var(--th-shadow,0 10px 32px rgba(31,67,92,.25))!important;
  }
  .contacts-window>.titlebar,.chat-window>.titlebar{
    height:36px!important;min-height:36px!important;
    padding:0 8px!important;
    border:0!important;
    border-bottom:1px solid var(--th-border,#8baec6)!important;
    border-radius:4px 4px 0 0!important;
    background:linear-gradient(var(--th-title-a,#75b2d8),var(--th-title-b,#356f9b))!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.35)!important;
    font-family:Tahoma,Verdana,Arial,sans-serif!important;
  }
  .contacts-window>.titlebar>.qip-logo,
  .chat-window>.titlebar>.qip-logo{
    width:28px!important;height:24px!important;min-width:28px!important;
    border:1px solid rgba(255,255,255,.72)!important;
    border-radius:4px!important;
    box-shadow:inset 0 0 0 1px rgba(39,96,3,.25)!important;
  }
  .version-mark{border-radius:2px!important;font-family:Tahoma,Verdana,Arial,sans-serif!important}

  .action-toolbar{
    height:60px!important;min-height:60px!important;
    gap:3px!important;padding:4px 5px!important;
    border-bottom:1px solid var(--th-border,#8baec6)!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-panel-strong,#dcebf5))!important;
  }
  .action-button{
    height:50px!important;min-height:50px!important;
    padding:3px 2px!important;
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-button-b,#dcebf5))!important;
    box-shadow:inset 1px 1px 0 rgba(255,255,255,.46),inset -1px -1px 0 rgba(0,0,0,.10)!important;
  }
  .action-button:hover{border-color:var(--th-accent,#7db91e)!important;background:var(--th-hover,#eaf4f9)!important}
  .action-button:active{box-shadow:inset 1px 1px 2px rgba(0,0,0,.22)!important}
  .action-button .button-label{font-family:Tahoma,Verdana,Arial,sans-serif!important}

  .profile-card{
    border-bottom:1px solid var(--th-border,#8baec6)!important;
    background:var(--th-panel-alt,#edf7fd)!important;
  }
  .profile-card .avatar-large{border-radius:5px!important}
  .id-search-box{
    border-bottom:1px solid var(--th-border,#8baec6)!important;
    background:var(--th-panel,#f8fcff)!important;
  }
  .id-search-box .qip-input,.id-search-box .primary{border-radius:3px!important}

  .list-heading{
    border-bottom:1px solid var(--th-border,#8baec6)!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-panel-strong,#dcebf5))!important;
  }
  .sidebar-tab,.mini-refresh{
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-button-b,#dcebf5))!important;
    box-shadow:inset 1px 1px 0 rgba(255,255,255,.42)!important;
  }
  .sidebar-tab.active{
    border-color:var(--th-accent,#7db91e)!important;
    background:linear-gradient(var(--th-primary-a,#c2ef75),var(--th-primary-b,#7db91e))!important;
    color:var(--th-primary-text,#1a3b03)!important;
    box-shadow:inset 1px 1px 2px rgba(0,0,0,.18)!important;
  }
  .sidebar-tab b{border:1px solid var(--th-border,#8baec6)!important;border-radius:2px!important}

  .conversation-list{padding:4px!important;background:var(--th-panel,#f8fcff)!important}
  .conversation-section-label{
    border-bottom:1px dotted var(--th-border,#8baec6)!important;
    background:var(--th-panel-alt,#edf7fd)!important;
    backdrop-filter:none!important;
  }
  .conversation-item{
    min-height:62px!important;
    margin:0 0 3px!important;
    border:1px solid color-mix(in srgb,var(--th-border,#8baec6) 55%,transparent)!important;
    border-radius:3px!important;
    background:linear-gradient(color-mix(in srgb,var(--th-panel,#f8fcff) 97%,#fff),var(--th-panel,#f8fcff))!important;
  }
  .conversation-item:hover{border-color:var(--th-border,#8baec6)!important;background:var(--th-hover,#eaf4f9)!important}
  .conversation-item.selected{
    border-color:var(--th-accent,#7db91e)!important;
    background:color-mix(in srgb,var(--th-panel-alt,#edf7fd) 78%,var(--th-accent,#7db91e) 22%)!important;
    outline:1px dotted color-mix(in srgb,var(--th-accent,#7db91e) 75%,transparent)!important;
    outline-offset:-3px!important;
  }
  .conversation-avatar-shell>.avatar,.conversation-item>.avatar{border-radius:5px!important}
  .conversation-pin-button{
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-button-b,#dcebf5))!important;
  }
  .unread-badge{
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-primary-a,#c2ef75),var(--th-primary-b,#7db91e))!important;
    color:var(--th-primary-text,#1a3b03)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.48)!important;
  }
  .statusbar{
    border-top:1px solid var(--th-border,#8baec6)!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-panel-strong,#dcebf5))!important;
  }

  .chat-header{
    border-bottom:1px solid var(--th-border,#8baec6)!important;
    background:linear-gradient(90deg,var(--th-panel-alt,#edf7fd),var(--th-panel,#f8fcff))!important;
  }
  .chat-header .avatar-large{border-radius:5px!important}
  .chat-info-button{
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-button-b,#dcebf5))!important;
    box-shadow:inset 1px 1px 0 rgba(255,255,255,.42)!important;
  }
  .group-pinned-banner{border-radius:3px!important}

  .message-list{
    background:
      linear-gradient(color-mix(in srgb,var(--th-chat,#f6fbfe) 96%,transparent),color-mix(in srgb,var(--th-chat,#f6fbfe) 96%,transparent)),
      repeating-linear-gradient(0deg,transparent 0 19px,color-mix(in srgb,var(--th-border,#8baec6) 7%,transparent) 19px 20px)!important;
    scroll-behavior:auto!important;
  }
  .message-row .avatar{border-radius:5px!important}
  .message-bubble{
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.3),1px 1px 2px rgba(0,0,0,.08)!important;
  }
  .message-row.mine .message-bubble{border-radius:3px!important;border-color:var(--th-accent,#7db91e)!important}
  .message-day{
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-button-b,#dcebf5))!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.4)!important;
  }

  .composer{
    border-top:1px solid var(--th-border,#8baec6)!important;
    background:var(--th-panel,#f8fcff)!important;
  }
  .composer-recipient{
    border-bottom:1px solid var(--th-border,#8baec6)!important;
    background:var(--th-panel-alt,#edf7fd)!important;
  }
  .composer-toolbar{
    border-bottom:1px solid var(--th-border,#8baec6)!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-button-b,#dcebf5))!important;
  }
  .composer-toolbar .tool-button{
    border:1px solid var(--th-border,#8baec6)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-button-a,#fff),var(--th-button-b,#dcebf5))!important;
  }
  .composer textarea{
    border:2px inset color-mix(in srgb,var(--th-border,#8baec6) 65%,#fff)!important;
    border-radius:2px!important;
    box-shadow:none!important;
  }
  .send-button{
    border:1px solid var(--th-accent,#7db91e)!important;
    border-radius:3px!important;
    background:linear-gradient(var(--th-primary-a,#c2ef75),var(--th-primary-b,#7db91e))!important;
    box-shadow:inset 1px 1px 0 rgba(255,255,255,.58),inset -1px -1px 0 rgba(0,0,0,.16)!important;
  }
  .voice-recording-bar{border-radius:3px!important}
}

/* Win98 остаётся максимально прямоугольным, независимо от устройства */
html[data-theme="win98"] .message-bubble,
html[data-theme="win98"] .message-day,
html[data-theme="win98"] .composer-input-shell,
html[data-theme="win98"] .mobile-voice-button,
html[data-theme="win98"] .send-button,
html[data-theme="win98"] .conversation-item,
html[data-theme="win98"] .mobile-nav-button,
html[data-theme="win98"] .chat-info-button,
html[data-theme="win98"] .mobile-back-button{border-radius:0!important}

/* =========================================================
   vAvtobyse 2.8.4 — тема «Автобус в прошлое», палитра B
   Современная читаемость при неизменной фирменной ретро-оболочке.
   ========================================================= */
html[data-theme="bus-past"] .message-bubble{
  background:#e8dfca!important;
  color:#2b2924!important;
  border-color:#8d826b!important;
  text-shadow:none!important;
}
html[data-theme="bus-past"] .message-row.mine .message-bubble{
  background:linear-gradient(180deg,#e6c66f 0%,#d8ad51 100%)!important;
  color:#2b2414!important;
  border-color:#b4862f!important;
}
html[data-theme="bus-past"] .message-bubble a{color:#28547a!important;text-decoration-color:#5f7690!important}
html[data-theme="bus-past"] .message-row.mine .message-bubble a{color:#3f3213!important;text-decoration-color:#6f5724!important}
html[data-theme="bus-past"] .message-bubble .voice-player-meta,
html[data-theme="bus-past"] .message-bubble .voice-player-time,
html[data-theme="bus-past"] .message-bubble .message-edited{color:#625d50!important}
html[data-theme="bus-past"] .message-row.mine .message-bubble .voice-player-meta,
html[data-theme="bus-past"] .message-row.mine .message-bubble .voice-player-time,
html[data-theme="bus-past"] .message-row.mine .message-bubble .message-edited{color:#65501f!important}
html[data-theme="bus-past"] .message-bubble .file-card{
  background:rgba(255,250,237,.72)!important;
  color:#2b2924!important;
  border-color:#9b8d72!important;
}
html[data-theme="bus-past"] .message-row.mine .message-bubble .file-card{
  background:rgba(255,244,205,.62)!important;
  color:#2b2414!important;
  border-color:#aa7e2d!important;
}
html[data-theme="bus-past"] .message-day{
  color:#f0e5ca!important;
  background:linear-gradient(180deg,#41423c,#30332f)!important;
  border-color:#776f5c!important;
}
html[data-theme="bus-past"] .conversation-item{
  background:linear-gradient(180deg,#303532,#292e2d)!important;
  border-color:#5d5c51!important;
}
html[data-theme="bus-past"] .conversation-item:hover{background:#41443e!important;border-color:#8d805d!important}
html[data-theme="bus-past"] .conversation-item.selected{
  background:linear-gradient(180deg,#65562f,#4d4329)!important;
  border-color:#d6ac49!important;
  outline-color:rgba(214,172,73,.72)!important;
}
html[data-theme="bus-past"] .conversation-item.pinned{
  background:linear-gradient(180deg,#4a4433,#35352f)!important;
}
html[data-theme="bus-past"] .qip-input:focus,
html[data-theme="bus-past"] textarea:focus,
html[data-theme="bus-past"] select:focus{
  border-color:#d6ac49!important;
  box-shadow:0 0 0 2px rgba(214,172,73,.18)!important;
}
html[data-theme="bus-past"] .titlebar,
html[data-theme="bus-past"] .toolbar,
html[data-theme="bus-past"] .composer-toolbar,
html[data-theme="bus-past"] .mobile-bottom-nav{
  text-shadow:0 1px 0 rgba(0,0,0,.42);
}
html[data-theme="bus-past"] .unread-badge,
html[data-theme="bus-past"] .primary,
html[data-theme="bus-past"] .send-button{
  text-shadow:none!important;
}

html[data-theme="bus-past"] .voice-message.voice-player{
  background:#f2ead8!important;
  color:#2b2924!important;
  border-color:#fff8e8 #82765e #82765e #fff8e8!important;
}
html[data-theme="bus-past"] .voice-play-button,
html[data-theme="bus-past"] .voice-speed-button{
  background:#d8cfbc!important;
  color:#3f341d!important;
  border-color:#fff8e8 #675f50 #675f50 #fff8e8!important;
}
html[data-theme="bus-past"] .voice-player.playing .voice-play-button{
  background:#d6ac49!important;
  color:#2b2414!important;
}
html[data-theme="bus-past"] .voice-message-label{color:#3d382f!important}
html[data-theme="bus-past"] .voice-progress{accent-color:#b9892d!important}
html[data-theme="bus-past"] .voice-progress::-webkit-slider-runnable-track{
  border-color:#81755f!important;
  background:linear-gradient(to right,#c99735 0 var(--voice-progress),#fff8e8 var(--voice-progress) 100%)!important;
}
html[data-theme="bus-past"] .voice-progress::-moz-range-track{border-color:#81755f!important;background:#fff8e8!important}
html[data-theme="bus-past"] .voice-progress::-moz-range-progress{background:#c99735!important}


/* vAvtobyse 2.8.5 — удобный ручной ввод даты рождения */
.birthday-control{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:6px;
  align-items:stretch;
}
.birthday-text-input{
  min-width:0;
  font-variant-numeric:tabular-nums;
  letter-spacing:.04em;
}
.birthday-calendar-button{
  min-width:116px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  white-space:nowrap;
}
.birthday-calendar-button img{width:18px;height:18px;display:block}
.birthday-native-picker{
  position:absolute;
  right:0;
  bottom:0;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.birthday-hint{margin:5px 0 0;line-height:1.35}
.birthday-error{margin:5px 0 0;color:#a4261e;font-size:11px;font-weight:bold;line-height:1.35}
.birthday-text-input[aria-invalid="true"]{
  border-color:#b13d32!important;
  box-shadow:0 0 0 2px rgba(177,61,50,.16)!important;
}
html[data-theme="dark-retro"] .birthday-error,
html[data-theme="bus-past"] .birthday-error{color:#ff9d8f}
@media(max-width:520px){
  .birthday-calendar-button{min-width:44px;width:44px;padding:7px}
  .birthday-calendar-button span{display:none}
  .birthday-calendar-button img{width:20px;height:20px}
}

/* vAvtobyse 2.8.6 — стабильный проигрыватель голосовых */
.voice-player{position:relative}
.voice-progress{
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  overscroll-behavior:contain;
}
.voice-player.seeking .voice-progress::-webkit-slider-thumb{background:#ffe08a}
.voice-player.seeking .voice-progress::-moz-range-thumb{background:#ffe08a}
.voice-player.buffering .voice-play-button{cursor:progress;opacity:.72}
.voice-player.buffering .voice-message-label::after{content:' · загрузка…';font-weight:400}
.voice-player-error .voice-progress{pointer-events:none}
@media(max-width:720px){
  .voice-progress{height:28px}
  .voice-progress::-webkit-slider-thumb{width:20px;height:24px;margin-top:-9px}
  .voice-progress::-moz-range-thumb{width:18px;height:22px}
}


/* =========================================================
   vAvtobyse 2.8.7 — вариант A: минималистичный автобус-статус
   Единый язык присутствия без старого цветка и круглых точек.
   ========================================================= */
.online-dot,.conversation-mobile-presence{display:none!important}
.bus-presence-wrap{
  --bus-color:#86c83d;
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-width:0;
  vertical-align:middle;
  flex:0 0 auto;
}
.bus-presence-wrap.with-text{
  color:var(--th-muted,#667b86);
  font:700 10px/1.25 Tahoma,Verdana,Arial,sans-serif;
}
.bus-presence{
  width:23px;
  height:20px;
  display:inline-grid;
  place-items:center;
  flex:0 0 23px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent!important;
  color:var(--bus-color);
  box-shadow:none!important;
  filter:drop-shadow(0 1px 0 rgba(0,0,0,.48));
}
.bus-presence-svg{width:23px;height:20px;display:block;overflow:visible}
.bus-presence-svg .bus-body{fill:currentColor;stroke:rgba(22,25,25,.78);stroke-width:1.15;stroke-linejoin:round}
.bus-presence-svg .bus-window{fill:#293339;stroke:rgba(246,227,171,.48);stroke-width:.55}
.bus-presence-svg .bus-divider,.bus-presence-svg .bus-bumper{fill:none;stroke:rgba(246,227,171,.78);stroke-width:1.1;stroke-linecap:square}
.bus-presence-svg .bus-light{fill:#fff0a8;stroke:rgba(43,37,17,.75);stroke-width:.55}
.bus-green{--bus-color:#86c83d}
.bus-yellow{--bus-color:#e0b648}
.bus-cyan{--bus-color:#59b9c7}
.bus-blue{--bus-color:#4c98df}
.bus-purple{--bus-color:#9b6bd0}
.bus-orange{--bus-color:#e47e35}
.bus-red{--bus-color:#d84c46}
.bus-presence-label{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:inherit;
}
.online-line,.account-presence,.activity-preview,.search-presence,.member-presence{display:flex;align-items:center;min-width:0}
.online-line{margin-top:3px;color:var(--th-muted,#667b86)}
.activity-line{color:var(--th-muted,#667b86);opacity:.82}
.account-presence{margin-top:5px}
.activity-preview{
  margin-top:7px;
  padding:9px 10px;
  border:2px solid;
  border-color:var(--th-highlight,#f7e4a4) var(--th-shadow,#5e5544) var(--th-shadow,#5e5544) var(--th-highlight,#f7e4a4);
  border-radius:2px;
  background:var(--th-panel-soft,#31383a);
}
.presence-activity-text{display:none!important}
.conversation-bus-presence{display:inline-flex!important;transform:none!important}
.conversation-presence-line{color:var(--th-muted,#71828a)!important}
.chat-header .bus-presence-label{color:var(--th-title-text,#f7e7bd)!important}

.status-preset{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:6px 8px;
}
.status-preset::before,.connection-bus-mini{
  content:"";
  width:23px;
  height:20px;
  flex:0 0 23px;
  background-color:var(--status-bus-color,#86c83d);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 24'%3E%3Cpath d='M6 2h16c2.2 0 4 1.8 4 4v11c0 1.7-1.3 3-3 3v2h-4v-2H9v2H5v-2c-1.7 0-3-1.3-3-3V6c0-2.2 1.8-4 4-4Zm0 4v6h16V6H6Zm1 9v2h4v-2H7Zm10 0v2h4v-2h-4Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 24'%3E%3Cpath d='M6 2h16c2.2 0 4 1.8 4 4v11c0 1.7-1.3 3-3 3v2h-4v-2H9v2H5v-2c-1.7 0-3-1.3-3-3V6c0-2.2 1.8-4 4-4Zm0 4v6h16V6H6Zm1 9v2h4v-2H7Zm10 0v2h4v-2h-4Z'/%3E%3C/svg%3E") center/contain no-repeat;
  filter:drop-shadow(0 1px 0 rgba(0,0,0,.42));
}
.status-preset[data-tone="green"]{--status-bus-color:#86c83d}
.status-preset[data-tone="yellow"]{--status-bus-color:#e0b648}
.status-preset[data-tone="cyan"]{--status-bus-color:#59b9c7}
.status-preset[data-tone="blue"]{--status-bus-color:#4c98df}
.status-preset[data-tone="purple"]{--status-bus-color:#9b6bd0}
.status-preset[data-tone="orange"]{--status-bus-color:#e47e35}
.status-preset[data-tone="red"]{--status-bus-color:#d84c46}
.status-preset.active::after{
  content:"✓";
  margin-left:auto;
  color:var(--th-primary-text,#161616);
  font-weight:900;
}
.connection-state{display:inline-flex;align-items:center;gap:6px}
.connection-bus-mini{--status-bus-color:#86c83d;width:18px;height:16px;flex-basis:18px}

@media(max-width:820px){
  .bus-presence{width:25px;height:22px;flex-basis:25px}
  .bus-presence-svg{width:25px;height:22px}
  .chat-title-line .bus-presence{width:23px;height:20px;flex-basis:23px}
  .status-preset{min-height:44px;font-size:12px}
}

/* =========================================================
   vAvtobyse 2.8.8 — новое входящее сообщение: ретро-конверт
   ========================================================= */
.notification-tool{position:relative!important}
.notification-dot{display:none!important}

.unread-envelope-badge,
.app-unread-envelope{
  --mail-a:#ffe7a0;
  --mail-b:#d6a63d;
  --mail-ink:#342815;
  --mail-hi:#fff7d2;
  --mail-shadow:#675129;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-width:35px;
  height:23px;
  padding:1px 5px 1px 4px;
  border:2px solid;
  border-color:var(--mail-hi) var(--mail-shadow) var(--mail-shadow) var(--mail-hi);
  border-radius:2px;
  background:linear-gradient(180deg,var(--mail-a),var(--mail-b));
  color:var(--mail-ink);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 1px 0 rgba(0,0,0,.22);
  font:700 10px/1 Tahoma,Verdana,Arial,sans-serif;
  letter-spacing:0;
  text-shadow:none!important;
  white-space:nowrap;
}

.unread-envelope-icon{
  display:block;
  width:17px;
  height:14px;
  flex:0 0 17px;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M1 2h22v14H1V2Zm2.7 2 8.3 6.1L20.3 4H3.7Zm-.7 2.2V14h18V6.2l-9 6.6-9-6.6Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M1 2h22v14H1V2Zm2.7 2 8.3 6.1L20.3 4H3.7Zm-.7 2.2V14h18V6.2l-9 6.6-9-6.6Z'/%3E%3C/svg%3E") center/contain no-repeat;
  filter:drop-shadow(0 1px 0 rgba(255,255,255,.32));
}
.unread-envelope-count,.app-unread-count{min-width:9px;text-align:center}

.conversation-item.has-unread{
  box-shadow:inset 3px 0 0 #d6ac49!important;
}
.conversation-item.has-unread .conversation-title{
  font-weight:800!important;
}
.conversation-item.has-unread .conversation-preview{
  color:var(--th-text,#26353d)!important;
  font-weight:700!important;
}
.conversation-item.has-unread .conversation-list-time{
  color:#a8751f!important;
  font-weight:700!important;
}
.conversation-item.has-unread .unread-envelope-badge{
  animation:mail-arrive .48s steps(3,end) both;
}

.app-unread-envelope{
  position:absolute;
  z-index:3;
  top:-7px;
  right:-8px;
  min-width:31px;
  height:20px;
  padding:1px 4px 1px 3px;
  gap:2px;
  pointer-events:none;
  transform-origin:center;
}
.app-unread-envelope .unread-envelope-icon{width:14px;height:12px;flex-basis:14px}
.app-unread-envelope:not(.hidden){animation:mail-arrive .48s steps(3,end) both}

@keyframes mail-arrive{
  0%{transform:translateY(-4px) scale(.88);opacity:0}
  65%{transform:translateY(1px) scale(1.05);opacity:1}
  100%{transform:translateY(0) scale(1);opacity:1}
}

html[data-theme="bus-past"] .unread-envelope-badge,
html[data-theme="bus-past"] .app-unread-envelope{
  --mail-a:#f7e5a4;
  --mail-b:#c99735;
  --mail-ink:#2b2414;
  --mail-hi:#fff4c8;
  --mail-shadow:#6d5730;
}
html[data-theme="bus-past"] .conversation-item.has-unread{
  background:linear-gradient(180deg,#4c4532,#343832)!important;
  border-color:#b18d3d!important;
  box-shadow:inset 3px 0 0 #e0b648!important;
}
html[data-theme="bus-past"] .conversation-item.has-unread .conversation-preview{
  color:#f2e8d4!important;
}
html[data-theme="bus-past"] .conversation-item.has-unread .conversation-list-time{
  color:#e1bf69!important;
}

@media(max-width:820px){
  .unread-envelope-badge{min-width:38px;height:25px;padding:1px 6px 1px 4px}
  .unread-envelope-icon{width:18px;height:15px;flex-basis:18px}
  .app-unread-envelope{top:-4px;right:-3px;min-width:31px;height:21px}
}

@media(prefers-reduced-motion:reduce){
  .conversation-item.has-unread .unread-envelope-badge,
  .app-unread-envelope:not(.hidden){animation:none!important}
}

/* =========================================================
   vAvtobyse 2.8.9 — галочки доставки и прочтения в личном чате
   ========================================================= */
.message-receipt{
  display:inline-flex;
  align-items:center;
  min-width:12px;
  height:14px;
  margin-left:5px;
  vertical-align:-2px;
  color:color-mix(in srgb,var(--th-muted,#8497a5) 82%,transparent);
  font:700 12px/12px Tahoma,Verdana,Arial,sans-serif;
  letter-spacing:0;
  white-space:nowrap;
  user-select:none;
  opacity:.86;
  text-shadow:0 1px 0 color-mix(in srgb,var(--th-chat,#fff) 55%,transparent);
}
.message-receipt-tick{display:block;width:8px;text-align:center}
.message-receipt-tick-second{margin-left:-3px}
.message-receipt-delivered{
  color:color-mix(in srgb,var(--th-text,#4e6676) 72%,var(--th-muted,#8497a5));
  opacity:.9;
}
.message-receipt-read{
  color:var(--th-accent-2,var(--th-accent,#b58b32));
  opacity:1;
  filter:drop-shadow(0 1px 0 rgba(255,255,255,.16));
}
html[data-theme="bus-past"] .message-receipt-sent{color:#8e8b7d}
html[data-theme="bus-past"] .message-receipt-delivered{color:#c0b89f}
html[data-theme="bus-past"] .message-receipt-read{color:#e0b648}
@media(max-width:820px){
  .message-receipt{height:13px;margin-left:3px;font-size:11px;line-height:11px;vertical-align:-1px}
  .message-receipt-tick{width:7px}
  .message-receipt-tick-second{margin-left:-3px}
}

/* =========================================================
   vAvtobyse 2.9.0 — статусы голосового: открыто и прослушано
   ========================================================= */
.message-receipt-opened{
  color:color-mix(in srgb,var(--th-accent,#b58b32) 46%,var(--th-muted,#8497a5));
  opacity:.94;
}
.message-receipt-listened{
  color:var(--th-accent-2,var(--th-accent,#b58b32));
  opacity:1;
  filter:drop-shadow(0 1px 0 rgba(255,255,255,.18));
}
html[data-theme="bus-past"] .message-receipt-opened{color:#cdbf98}
html[data-theme="bus-past"] .message-receipt-listened{color:#e0b648}
.voice-player-listened .voice-message-label::after{
  content:' · прослушано';
  color:var(--th-accent-2,var(--th-accent,#b58b32));
  font-size:.9em;
}


/* =========================================================
   vAvtobyse 2.9.1 — групповые отметки прочтения и прослушивания
   ========================================================= */
.group-message-receipt{
  appearance:none;
  border:0;
  background:transparent;
  padding:0 2px;
  cursor:pointer;
  font:inherit;
}
.group-message-receipt:disabled{cursor:default;opacity:.7}
.group-message-receipt:not(:disabled):hover,
.group-message-receipt:not(:disabled):focus-visible{
  outline:1px dotted currentColor;
  outline-offset:2px;
}
.group-receipt-count{
  display:inline-block;
  margin-left:3px;
  font:700 9px/12px Tahoma,Verdana,Arial,sans-serif;
  letter-spacing:-.15px;
}
.message-receipt-delivered-partial,
.message-receipt-read-partial,
.message-receipt-opened-partial,
.message-receipt-listened-partial{opacity:.94}
.message-receipt-read-partial,
.message-receipt-opened-partial{
  color:color-mix(in srgb,var(--th-accent,#b58b32) 68%,var(--th-muted,#8497a5));
}
.message-receipt-listened-partial{
  color:color-mix(in srgb,var(--th-accent-2,var(--th-accent,#b58b32)) 82%,var(--th-muted,#8497a5));
}
html[data-theme="bus-past"] .message-receipt-delivered-partial{color:#c0b89f}
html[data-theme="bus-past"] .message-receipt-read-partial,
html[data-theme="bus-past"] .message-receipt-opened-partial{color:#d0b66f}
html[data-theme="bus-past"] .message-receipt-listened-partial{color:#d7b955}
.group-receipt-details-modal{width:min(520px,96vw)}
.group-receipt-details-page{min-height:260px}
.receipt-details-help{margin:0 0 10px}
.group-receipt-details-list{display:grid;gap:10px}
.receipt-details-section{
  border:2px inset color-mix(in srgb,var(--th-line,#a8c2d4) 74%,#fff);
  background:color-mix(in srgb,var(--th-panel,#edf5fa) 92%,#fff);
}
.receipt-details-heading{margin:0;padding:7px 9px}
.receipt-member-row{
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  gap:8px;
  align-items:center;
  padding:7px 9px;
  border-top:1px dotted color-mix(in srgb,var(--th-line,#a8c2d4) 70%,transparent);
}
.receipt-member-avatar{width:34px;height:34px;font-size:17px}
.receipt-member-name{font-weight:700;color:var(--th-text,#253745)}
.receipt-member-sub{margin-top:2px;font-size:10px;color:var(--th-muted,#6f7f89)}
.receipt-details-empty{padding:14px;text-align:center;color:var(--th-muted,#6f7f89)}
html[data-theme="bus-past"] .receipt-details-section{
  border-color:#776b50;
  background:#343833;
}
html[data-theme="bus-past"] .receipt-member-row{border-top-color:#665d48}
html[data-theme="bus-past"] .receipt-member-name{color:#f2e8d4}
html[data-theme="bus-past"] .receipt-member-sub,
html[data-theme="bus-past"] .receipt-details-empty{color:#c0b89f}
@media(max-width:820px){
  .group-receipt-count{font-size:8px;margin-left:2px}
  .group-receipt-details-modal{width:100%;height:100%;max-height:none}
}

/* =========================================================
   vAvtobyse 2.9.6 — RESPONSIVE OVERHAUL
   Кумулятивно: статусы C + разделённые режимы document/shell.
   Этот блок является последним и главным источником геометрии.
   ========================================================= */

:root{
  --vav-app-height:100dvh;
  --vav-visual-height:100dvh;
  --vav-layout-height:100dvh;
  --vav-viewport-offset-top:0px;
  --vav-keyboard-height:0px;
  --vav-tap:44px;
}

/* Вариант C: единые пиксельные автобусы во всех интерфейсах. */
.bus-presence-wrap{gap:6px!important}
.bus-presence{width:28px!important;height:25px!important;flex:0 0 28px!important;color:inherit!important;filter:none!important}
.bus-presence-svg.status-bus-c-image{display:block!important;width:28px!important;height:25px!important;max-width:none!important;object-fit:contain!important;overflow:visible!important;pointer-events:none!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.42));image-rendering:pixelated;image-rendering:crisp-edges}
.bus-green{--bus-color:#4CAF50}.bus-yellow{--bus-color:#FFC107}.bus-blue,.bus-cyan{--bus-color:#03A9F4}.bus-purple{--bus-color:#9C27B0}.bus-orange{--bus-color:#FF9800}.bus-gray{--bus-color:#607D8B}.bus-red{--bus-color:#F44336}
.status-preset::before{width:31px!important;height:28px!important;flex:0 0 31px!important;background-color:transparent!important;-webkit-mask:none!important;mask:none!important;background-repeat:no-repeat!important;background-position:center!important;background-size:contain!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.38))!important;image-rendering:pixelated;image-rendering:crisp-edges}
.status-preset[data-activity="available"]::before{background-image:url("status-buses/master-c/available.png?v=2.9.18-visual-part4")!important}
.status-preset[data-activity="work"]::before{background-image:url("status-buses/master-c/work.png?v=2.9.18-visual-part4")!important}
.status-preset[data-activity="home"]::before{background-image:url("status-buses/master-c/home.png?v=2.9.18-visual-part4")!important}
.status-preset[data-activity="sleep"]::before{background-image:url("status-buses/master-c/sleep.png?v=2.9.18-visual-part4")!important}
.status-preset[data-activity="road"]::before{background-image:url("status-buses/master-c/road.png?v=2.9.18-visual-part4")!important}
.status-preset[data-activity="dnd"]::before{background-image:url("status-buses/master-c/dnd.png?v=2.9.18-visual-part4")!important}
.status-preset[data-tone="gray"]{--status-bus-color:#607D8B}
.status-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.status-preset{min-height:49px!important;padding:7px 9px!important}
.activity-preview .bus-presence-svg.status-bus-c-image{width:34px!important;height:30px!important}
.activity-preview .bus-presence{width:34px!important;height:30px!important;flex-basis:34px!important}
.conversation-bus-presence{transform:none!important}
.chat-title-line .bus-presence{width:27px!important;height:24px!important;flex-basis:27px!important}
.chat-title-line .status-bus-c-image{width:27px!important;height:24px!important}

/* РЕЖИМ ДОКУМЕНТА: вход, регистрация, восстановление и системные экраны. */
html.vav-document-mode,body.vav-document-mode{height:auto!important;min-height:100%!important;max-height:none!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior-y:auto!important}
body.vav-document-mode{position:static!important;inset:auto!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important}
body.vav-document-mode .auth-flow-screen{width:100%!important;height:auto!important;min-height:100svh!important;max-height:none!important;overflow:visible!important;padding:18px!important}
body.vav-document-mode .auth-flow-screen:not(.hidden){display:flex!important;align-items:center!important;justify-content:center!important}
body.vav-document-mode .auth-flow-screen .qip-window{overflow:visible!important;max-height:none!important}
body.vav-document-mode .auth-flow-screen .login-window{width:min(560px,100%)!important;margin:auto!important}
body.vav-document-mode .auth-flow-screen .padded{overflow:visible!important;max-height:none!important}
body.vav-document-mode input,body.vav-document-mode textarea,body.vav-document-mode select{scroll-margin-top:88px;scroll-margin-bottom:calc(140px + env(safe-area-inset-bottom))}

/* РЕЖИМ ОБОЛОЧКИ: после входа прокручиваются только рабочие области. */
html.vav-shell-mode,body.vav-shell-mode{width:100%!important;height:var(--vav-app-height,100dvh)!important;min-height:0!important;max-height:var(--vav-app-height,100dvh)!important;overflow:hidden!important;overscroll-behavior:none!important}
body.vav-shell-mode{position:fixed!important;inset:var(--vav-viewport-offset-top,0px) 0 auto 0!important;touch-action:auto!important}
body.vav-shell-mode #appScreen{width:100%!important;height:var(--vav-app-height,100dvh)!important;min-height:0!important;max-height:var(--vav-app-height,100dvh)!important;overflow:hidden!important;touch-action:auto!important}
html.vav-splash-mode,body.vav-splash-mode{height:100%!important;overflow:hidden!important}

/* Общий режим телефонов, включая широкий телефон в landscape. */
@media (max-width:1024px){
  html.vav-mobile-layout body.vav-document-mode{background:var(--th-desktop,#eef6fb)!important}
  html.vav-mobile-layout body.vav-document-mode .auth-flow-screen{
    min-height:max(100svh,var(--vav-layout-height,100svh))!important;
    padding:calc(8px + env(safe-area-inset-top)) 8px calc(24px + env(safe-area-inset-bottom))!important;
    align-items:flex-start!important;
  }
  html.vav-mobile-layout body.vav-document-mode .auth-flow-screen .login-window{width:100%!important;max-width:560px!important;margin:0 auto!important;border-radius:7px!important}
  html.vav-mobile-layout body.vav-document-mode .auth-flow-screen .titlebar{position:sticky!important;top:0!important;z-index:4!important;min-height:46px!important;height:auto!important;padding:8px 10px!important}
  html.vav-mobile-layout body.vav-document-mode .auth-flow-screen .padded{padding:14px!important}
  html.vav-mobile-layout body.vav-document-mode h1{font-size:clamp(18px,5.2vw,22px)!important;line-height:1.2!important}
  html.vav-mobile-layout body.vav-document-mode h2{font-size:clamp(17px,4.8vw,20px)!important}
  html.vav-mobile-layout body.vav-document-mode .qip-input,
  html.vav-mobile-layout body.vav-document-mode input,
  html.vav-mobile-layout body.vav-document-mode textarea,
  html.vav-mobile-layout body.vav-document-mode select{font-size:16px!important;min-height:46px!important}
  html.vav-mobile-layout body.vav-document-mode button{min-height:44px!important;touch-action:manipulation!important}
  html.vav-mobile-layout body.vav-document-mode .auth-tabs{position:relative!important;top:auto!important;grid-template-columns:1fr 1fr!important}
  html.vav-mobile-layout body.vav-document-mode .login-help{grid-template-columns:1fr!important}
  html.vav-mobile-layout body.vav-document-mode .public-link-row{grid-template-columns:1fr!important}
  html.vav-mobile-layout body.vav-document-mode .public-link-row .copy-link-button{width:100%!important}
  html.vav-mobile-layout body.vav-document-mode .auth-small-actions{display:grid!important;grid-template-columns:1fr!important;gap:4px!important}
  html.vav-mobile-layout body.vav-document-mode .auth-small-actions button{white-space:normal!important}
  html.vav-mobile-layout body.vav-document-mode .retro-auth-footer{overflow-wrap:anywhere!important;text-align:center!important}
  html.vav-keyboard-open body.vav-document-mode .login-help,
  html.vav-keyboard-open body.vav-document-mode .public-link-box{display:none!important}

  html.vav-mobile-layout body.vav-shell-mode #appScreen{position:relative!important;display:block!important;padding:0!important;gap:0!important}
  html.vav-mobile-layout body.vav-shell-mode .contacts-window,
  html.vav-mobile-layout body.vav-shell-mode .chat-window{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:hidden!important}
  html.vav-mobile-layout body.vav-shell-mode .contacts-window{display:flex!important;padding-bottom:calc(61px + env(safe-area-inset-bottom))!important}
  html.vav-mobile-layout body.vav-shell-mode .chat-window{display:none!important}
  html.vav-mobile-layout body.vav-shell-mode .app.mobile-chat-open .contacts-window{display:none!important}
  html.vav-mobile-layout body.vav-shell-mode .app.mobile-chat-open .chat-window{display:flex!important}
  html.vav-mobile-layout body.vav-shell-mode .active-chat{height:100%!important;min-height:0!important;overflow:hidden!important}

  html.vav-mobile-layout body.vav-shell-mode .contacts-window>.titlebar{flex:0 0 auto!important;min-height:calc(56px + env(safe-area-inset-top))!important;height:calc(56px + env(safe-area-inset-top))!important;padding:env(safe-area-inset-top) 12px 0!important;font-size:16px!important}
  html.vav-mobile-layout body.vav-shell-mode .contacts-window>.titlebar>.qip-logo{display:none!important}
  html.vav-mobile-layout body.vav-shell-mode .mobile-account-button{display:grid!important;place-items:center!important}
  html.vav-mobile-layout body.vav-shell-mode .mobile-account-button .avatar{width:38px!important;height:38px!important;font-size:20px!important}
  html.vav-mobile-layout body.vav-shell-mode .contacts-window .toolbar,
  html.vav-mobile-layout body.vav-shell-mode .contacts-window .profile-card,
  html.vav-mobile-layout body.vav-shell-mode .contacts-window .id-search-box{display:none!important}
  html.vav-mobile-layout body.vav-shell-mode .mobile-header-new-chat{display:inline-grid!important}
  html.vav-mobile-layout body.vav-shell-mode .list-heading{flex:0 0 auto!important;min-height:45px!important;padding:9px 12px!important}
  html.vav-mobile-layout body.vav-shell-mode .conversation-list{flex:1 1 auto!important;min-height:0!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;padding:0 0 8px!important;background:#fff!important;touch-action:pan-y!important}
  html.vav-mobile-layout body.vav-shell-mode .conversation-item{min-width:0!important;min-height:70px!important;grid-template-columns:50px minmax(0,1fr) auto!important;gap:8px!important;padding:8px 10px!important;border-radius:0!important;border-bottom:1px solid rgba(120,150,170,.2)!important}
  html.vav-mobile-layout body.vav-shell-mode .conversation-main,
  html.vav-mobile-layout body.vav-shell-mode .conversation-title-line,
  html.vav-mobile-layout body.vav-shell-mode .conversation-preview{min-width:0!important}
  html.vav-mobile-layout body.vav-shell-mode .conversation-title-line{display:flex!important;align-items:center!important;gap:5px!important}
  html.vav-mobile-layout body.vav-shell-mode .conversation-title{flex:1 1 auto!important;min-width:0!important;font-size:14px!important}
  html.vav-mobile-layout body.vav-shell-mode .conversation-preview{font-size:12px!important;margin-top:5px!important}
  html.vav-mobile-layout body.vav-shell-mode .conversation-list-time{max-width:56px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  html.vav-mobile-layout body.vav-shell-mode .mobile-bottom-nav{display:grid!important;position:absolute!important;left:0!important;right:0!important;bottom:0!important;z-index:40!important;min-height:calc(61px + env(safe-area-inset-bottom))!important}
  html.vav-mobile-layout body.vav-shell-mode .mobile-nav-button{min-width:0!important;overflow:hidden!important}

  html.vav-mobile-layout body.vav-shell-mode .chat-window>.titlebar{display:none!important}
  html.vav-mobile-layout body.vav-shell-mode .chat-header{position:relative!important;z-index:5!important;flex:0 0 auto!important;min-height:calc(58px + env(safe-area-inset-top))!important;height:auto!important;grid-template-columns:38px 42px minmax(0,1fr) 38px!important;gap:7px!important;padding:calc(6px + env(safe-area-inset-top)) 8px 7px!important;overflow:hidden!important}
  html.vav-mobile-layout body.vav-shell-mode .mobile-back-button{display:block!important}
  html.vav-mobile-layout body.vav-shell-mode .chat-header-main,
  html.vav-mobile-layout body.vav-shell-mode .chat-title-line{min-width:0!important}
  html.vav-mobile-layout body.vav-shell-mode .chat-title-line{display:flex!important;align-items:center!important;gap:5px!important}
  html.vav-mobile-layout body.vav-shell-mode .chat-title,
  html.vav-mobile-layout body.vav-shell-mode .chat-subtitle{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  html.vav-mobile-layout body.vav-shell-mode .chat-header .avatar-large{width:40px!important;height:40px!important;border-radius:50%!important}
  html.vav-mobile-layout body.vav-shell-mode .group-pinned-banner{flex:0 0 auto!important;max-height:58px!important;overflow:hidden!important}
  html.vav-mobile-layout body.vav-shell-mode #groupPinnedText{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}

  html.vav-mobile-layout body.vav-shell-mode .message-list{flex:1 1 auto!important;min-height:0!important;width:100%!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;scroll-padding-bottom:84px!important;padding:10px 9px!important;touch-action:pan-y!important}
  html.vav-mobile-layout body.vav-shell-mode .message-row,
  html.vav-mobile-layout body.vav-shell-mode .message-content,
  html.vav-mobile-layout body.vav-shell-mode .message-bubble{min-width:0!important}
  html.vav-mobile-layout body.vav-shell-mode .message-content{max-width:min(88%,680px)!important}
  html.vav-mobile-layout body.vav-shell-mode .message-bubble{max-width:100%!important;overflow-wrap:anywhere!important;word-break:break-word!important}
  html.vav-mobile-layout body.vav-shell-mode .image-message{max-width:min(100%,520px)!important;height:auto!important;object-fit:contain!important}
  html.vav-mobile-layout body.vav-shell-mode .file-card{max-width:100%!important;min-width:0!important;overflow:hidden!important}
  html.vav-mobile-layout body.vav-shell-mode .file-card>div{min-width:0!important}
  html.vav-mobile-layout body.vav-shell-mode .file-name{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  html.vav-mobile-layout body.vav-shell-mode .voice-message.voice-player{width:min(285px,76vw)!important;min-width:0!important;max-width:100%!important}
  html.vav-mobile-layout body.vav-shell-mode .message-menu,
  html.vav-mobile-layout body.vav-shell-mode .message-context-menu{max-width:calc(100vw - 16px)!important;max-height:60vh!important;overflow:auto!important}

  html.vav-mobile-layout body.vav-shell-mode .composer{position:relative!important;flex:0 0 auto!important;bottom:auto!important;width:100%!important;min-width:0!important;padding:5px 6px calc(5px + env(safe-area-inset-bottom))!important;touch-action:auto!important}
  html.vav-mobile-layout body.vav-shell-mode .composer-row{width:100%!important;min-width:0!important;grid-template-columns:minmax(0,1fr) 48px!important;padding:0!important}
  html.vav-mobile-layout body.vav-shell-mode .composer-input-shell{min-width:0!important;grid-template-columns:38px minmax(0,1fr) 38px!important}
  html.vav-mobile-layout body.vav-shell-mode .composer textarea{min-width:0!important;width:100%!important;min-height:44px!important;max-height:min(120px,34vh)!important;font-size:16px!important;line-height:21px!important;resize:none!important;overscroll-behavior:contain!important}
  html.vav-mobile-layout body.vav-shell-mode .reply-preview,
  html.vav-mobile-layout body.vav-shell-mode .pending-file,
  html.vav-mobile-layout body.vav-shell-mode .voice-recording-bar{max-width:100%!important;min-width:0!important;overflow:hidden!important}
  html.vav-mobile-layout body.vav-shell-mode .emoji-panel{position:absolute!important;left:6px!important;right:6px!important;bottom:calc(64px + env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important;max-height:min(42vh,330px)!important;overflow-y:auto!important;overscroll-behavior:contain!important}
  html.vav-mobile-layout body.vav-shell-mode .voice-recording-bar{position:absolute!important;left:6px!important;right:6px!important;bottom:calc(64px + env(safe-area-inset-bottom))!important}

  html.vav-mobile-layout body.vav-shell-mode .modal-backdrop{position:fixed!important;inset:0!important;width:100%!important;height:var(--vav-app-height,100dvh)!important;max-height:var(--vav-app-height,100dvh)!important;padding:0!important;overflow:hidden!important;align-items:stretch!important}
  html.vav-mobile-layout body.vav-shell-mode .modal{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;min-height:0!important;border-radius:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
  html.vav-mobile-layout body.vav-shell-mode .modal.hidden{display:none!important}
  html.vav-mobile-layout body.vav-shell-mode .modal-titlebar{flex:0 0 auto!important;height:auto!important;min-height:calc(52px + env(safe-area-inset-top))!important;padding:env(safe-area-inset-top) 10px 0!important}
  html.vav-mobile-layout body.vav-shell-mode .modal>.padded,
  html.vav-mobile-layout body.vav-shell-mode .modal-page,
  html.vav-mobile-layout body.vav-shell-mode .group-receipt-details-page{flex:1 1 auto!important;min-height:0!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;padding-bottom:calc(110px + env(safe-area-inset-bottom))!important;touch-action:pan-y!important}
  html.vav-mobile-layout body.vav-shell-mode .modal-actions{flex:0 0 auto!important;position:relative!important;padding:8px 10px calc(8px + env(safe-area-inset-bottom))!important;background:var(--th-panel,#edf5fa)!important}
  html.vav-mobile-layout body.vav-shell-mode .modal-actions button{min-height:44px!important}
  html.vav-mobile-layout body.vav-shell-mode .modal input,
  html.vav-mobile-layout body.vav-shell-mode .modal textarea,
  html.vav-mobile-layout body.vav-shell-mode .modal select{font-size:16px!important;min-height:44px!important;scroll-margin-top:80px;scroll-margin-bottom:150px}
  html.vav-mobile-layout body.vav-shell-mode .account-actions,
  html.vav-mobile-layout body.vav-shell-mode .profile-questionnaire,
  html.vav-mobile-layout body.vav-shell-mode .group-settings-grid{grid-template-columns:1fr!important}
  html.vav-mobile-layout body.vav-shell-mode .member-actions{max-width:100%!important;flex-wrap:wrap!important;padding-left:0!important}
  html.vav-mobile-layout body.vav-shell-mode .member-actions button{min-height:40px!important}

  html.vav-mobile-layout .toast{left:8px!important;right:8px!important;top:calc(8px + env(safe-area-inset-top))!important;bottom:auto!important;width:auto!important;max-width:none!important;transform:none!important}
  html.vav-mobile-layout .toast.below-connection{top:calc(58px + env(safe-area-inset-top))!important}
  html.vav-mobile-layout .connection-banner{left:8px!important;right:8px!important;top:calc(8px + env(safe-area-inset-top))!important;transform:none!important;width:auto!important;max-width:none!important}
  html.vav-mobile-layout .status-preset-grid{grid-template-columns:1fr!important}
  html.vav-mobile-layout .status-preset{min-height:52px!important;font-size:13px!important}
}

@media(max-width:390px){
  html.vav-mobile-layout body.vav-document-mode .auth-flow-screen{padding-left:5px!important;padding-right:5px!important}
  html.vav-mobile-layout body.vav-document-mode .auth-flow-screen .padded{padding:12px!important}
  html.vav-mobile-layout body.vav-shell-mode .conversation-item{grid-template-columns:46px minmax(0,1fr) auto!important;padding:6px 8px!important;gap:6px!important}
  html.vav-mobile-layout body.vav-shell-mode .chat-header{grid-template-columns:36px 39px minmax(0,1fr) 36px!important;gap:5px!important;padding-left:5px!important;padding-right:5px!important}
  html.vav-mobile-layout body.vav-shell-mode .message-content{max-width:91%!important}
  html.vav-mobile-layout body.vav-shell-mode .composer{padding-left:4px!important;padding-right:4px!important}
  html.vav-mobile-layout body.vav-shell-mode .composer-row{grid-template-columns:minmax(0,1fr) 46px!important;gap:4px!important}
  html.vav-mobile-layout body.vav-shell-mode .composer-input-shell{grid-template-columns:35px minmax(0,1fr) 35px!important}
}

/* Планшет: двухпанельный режим без чрезмерно узкой области чата. */
@media(min-width:821px) and (max-width:1100px){
  html.vav-tablet-layout body.vav-shell-mode #appScreen{grid-template-columns:minmax(280px,34vw) minmax(0,1fr)!important;gap:6px!important;padding:6px!important}
  html.vav-tablet-layout .message-bubble{max-width:96%!important}
  html.vav-tablet-layout .composer-row{grid-template-columns:minmax(0,1fr) 94px!important}
  html.vav-tablet-layout .modal{width:min(680px,calc(100vw - 28px))!important}
}

/* Низкие окна и горизонтальная ориентация: формы остаются прокручиваемыми. */
@media(max-height:620px){
  body.vav-document-mode .auth-flow-screen{align-items:flex-start!important;padding-top:calc(8px + env(safe-area-inset-top))!important}
  body.vav-document-mode .auth-flow-screen .login-window{margin-top:0!important;margin-bottom:20px!important}
}


/* vAvtobyse 2.9.7 — Блок 7.1: локальный текстовый кэш (сохранён в составе 2.9.8). */


/* vAvtobyse 2.9.8 — Блок 7.2: фоновая синхронизация кэшированной истории. */
.message-sync-status{
  flex:0 0 auto;
  padding:4px 10px;
  border-bottom:1px solid rgba(111,128,142,.22);
  background:rgba(255,248,207,.88);
  color:#6f5d20;
  font-size:11px;
  line-height:1.25;
  text-align:center;
}
.message-sync-status[data-mode="offline"]{
  background:rgba(255,232,226,.94);
  color:#9a3f2f;
}
html[data-theme="bus"] .message-sync-status{
  background:rgba(54,48,27,.94);
  border-bottom-color:rgba(255,210,52,.28);
  color:#ffe27a;
}
html[data-theme="bus"] .message-sync-status[data-mode="offline"]{
  background:rgba(71,34,30,.96);
  color:#ffb1a4;
}

/* vAvtobyse 2.9.10 — 7.4A lazy media in the main chat */
.image-message.lazy-media-pending{
  min-height:120px;
  aspect-ratio:4/3;
  object-fit:contain;
  background:linear-gradient(135deg,rgba(120,140,155,.10),rgba(120,140,155,.22));
}
.image-message.lazy-media-pending:not([src]){color:transparent}
.image-message.lazy-media-error{min-height:72px;opacity:.58}
.file-card.lazy-media-loading{pointer-events:none;opacity:.7}
.file-card.lazy-media-loading .file-name::after{content:' · открываем…';font-weight:400}


/* vAvtobyse 2.9.12 — Блок 7.5: локальный кэш */
.cache-settings-modal{width:min(500px,100%)}
.cache-settings-summary{display:grid;gap:7px;margin-bottom:14px;padding:10px;border:1px solid var(--th-border,#abc4d6);background:var(--th-soft,#edf7fd)}
.cache-settings-summary>div{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.cache-settings-summary span{font-size:11px;color:var(--muted,#607b8d)}
.cache-settings-summary b{text-align:right;word-break:break-word}
.cache-persist-line{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;padding:10px;border:1px solid var(--th-border,#abc4d6);background:var(--th-panel,#f6fbfe)}
.cache-persist-line>div{display:grid;gap:3px;min-width:0}
.cache-settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
@media(max-width:520px){
  .cache-settings-summary>div,.cache-persist-line{align-items:stretch;flex-direction:column}
  .cache-settings-summary>div{display:grid;gap:2px}
  .cache-settings-summary b{text-align:left}
  .cache-settings-actions{grid-template-columns:1fr}
  .cache-settings-actions button,.cache-persist-line button{min-height:44px;width:100%}
}


/* vAvtobyse 2.9.13 — 7.6A offline text outbox */
.message-row.offline-pending .message-bubble{opacity:.78}
.message-offline-status{font-size:11px;line-height:1;color:var(--muted,#9ba3ad);white-space:nowrap;margin-left:6px}
.message-offline-status::before{content:'◷ ';}
.message-offline-status.error{color:#ff7d7d}
.message-offline-status.error::before{content:'! ';font-weight:800}

/* =========================================================
   vAvtobyse 2.9.15 — Theme Pack Part 2
   V1 + V3 visual correction: wet-asphalt splash + auth flow.
   Visual-only. No auth/message/database logic changed.
   ========================================================= */

/* --- Approved wet-asphalt launch screen --- */
#loadingScreen.brand-start-screen{
  position:relative;
  min-height:100svh!important;
  height:100svh!important;
  overflow:hidden!important;
  padding:0!important;
  background:#252b31!important;
  color:#eee7d8!important;
}
.wet-splash-shell{
  position:relative;
  width:100%;height:100%;min-height:100%;
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  overflow:hidden;
  isolation:isolate;
  background:
    radial-gradient(circle at 50% 34%,rgba(255,190,46,.09),transparent 28%),
    linear-gradient(180deg,#343b42 0%,#2c3339 45%,#242a30 76%,#1e2429 100%);
}
.wet-splash-shell::before{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  opacity:.22;
  background:
    repeating-linear-gradient(103deg,transparent 0 30px,rgba(223,232,238,.15) 31px,transparent 32px 61px),
    radial-gradient(circle at 16% 15%,rgba(255,255,255,.18) 0 1px,transparent 2px),
    radial-gradient(circle at 74% 21%,rgba(255,255,255,.14) 0 1px,transparent 2px);
  background-size:auto,73px 67px,97px 89px;
}
.wet-splash-sky{position:absolute;inset:auto 0 25% 0;height:24%;display:flex;align-items:flex-end;gap:3px;padding:0 2.5%;opacity:.48;z-index:0;pointer-events:none}
.wet-splash-sky span{display:block;flex:1;background:#20272d;border-radius:3px 3px 0 0;box-shadow:inset 0 0 0 1px rgba(255,205,71,.03)}
.wet-splash-sky span:nth-child(1){height:38%}.wet-splash-sky span:nth-child(2){height:76%}.wet-splash-sky span:nth-child(3){height:52%}.wet-splash-sky span:nth-child(4){height:88%}.wet-splash-sky span:nth-child(5){height:61%}
.wet-splash-brand{
  align-self:center;justify-self:center;
  display:flex;flex-direction:column;align-items:center;
  margin-top:-5vh;padding:24px;text-align:center;z-index:2;
}
.wet-splash-logo{
  width:clamp(96px,15vw,156px);height:auto;border-radius:26%;
  filter:drop-shadow(0 12px 26px rgba(0,0,0,.35)) drop-shadow(0 0 16px rgba(255,192,46,.16));
}
.wet-splash-wordmark{
  margin-top:17px;color:#f6c64a;
  font:800 clamp(32px,6vw,58px)/1 "Courier New",Consolas,monospace;
  letter-spacing:.03em;text-shadow:0 2px 0 rgba(0,0,0,.3);
}
.wet-splash-tagline{margin-top:8px;color:#e7dfce;font:600 clamp(14px,2vw,20px)/1.2 "Courier New",Consolas,monospace;letter-spacing:.08em}
.wet-splash-road{position:absolute;left:-5%;right:-5%;bottom:18%;height:18%;z-index:1;transform:perspective(520px) rotateX(58deg);transform-origin:50% 100%;background:linear-gradient(180deg,rgba(68,75,81,.5),#20262b 80%);border-top:1px solid rgba(255,204,73,.14);box-shadow:inset 0 15px 28px rgba(255,255,255,.02)}
.wet-splash-road::before{content:"";position:absolute;left:49.8%;top:0;bottom:0;border-left:3px dashed rgba(255,192,46,.38);filter:blur(.2px)}
.wet-splash-reflection{position:absolute;left:43%;right:43%;top:0;bottom:0;background:linear-gradient(180deg,rgba(255,191,46,.24),transparent 74%);filter:blur(7px)}
.wet-splash-loader{
  position:relative;z-index:4;align-self:end;
  display:grid;justify-items:center;gap:7px;
  width:min(720px,calc(100% - 28px));margin:0 auto max(14px,env(safe-area-inset-bottom));padding:13px 16px 11px;
  border:1px solid rgba(224,190,105,.3);border-radius:18px;
  background:linear-gradient(180deg,rgba(54,61,67,.9),rgba(39,45,50,.96));
  box-shadow:0 12px 34px rgba(0,0,0,.3),inset 0 1px rgba(255,255,255,.035);
  backdrop-filter:blur(8px);
}
.wet-loader-ring{position:relative;width:58px;height:58px;display:grid;place-items:center}
.wet-loader-ring img{width:31px;height:31px;border-radius:8px;z-index:2;box-shadow:0 0 14px rgba(255,190,46,.18)}
.wet-loader-ring i{position:absolute;left:27px;top:2px;width:4px;height:8px;border-radius:3px;background:#e6aa2e;transform-origin:2px 27px;animation:wet-loader-pulse 1.15s steps(2,end) infinite}
.wet-loader-ring i:nth-of-type(1){transform:rotate(0deg)}.wet-loader-ring i:nth-of-type(2){transform:rotate(45deg);animation-delay:.08s}.wet-loader-ring i:nth-of-type(3){transform:rotate(90deg);animation-delay:.16s}.wet-loader-ring i:nth-of-type(4){transform:rotate(135deg);animation-delay:.24s}.wet-loader-ring i:nth-of-type(5){transform:rotate(180deg);animation-delay:.32s}.wet-loader-ring i:nth-of-type(6){transform:rotate(225deg);animation-delay:.4s}.wet-loader-ring i:nth-of-type(7){transform:rotate(270deg);animation-delay:.48s}.wet-loader-ring i:nth-of-type(8){transform:rotate(315deg);animation-delay:.56s}
@keyframes wet-loader-pulse{0%,65%,100%{opacity:.18}24%{opacity:1;background:#ffd25a}}
#loadingScreen .wet-splash-loader .loading-status{margin:0;color:#f0d89a!important;font:700 12px/1.2 "Courier New",Consolas,monospace!important;letter-spacing:.12em!important;text-transform:uppercase!important;text-align:center}
#loadingScreen .wet-splash-loader .brand-loading-tip{width:100%;min-height:0;margin:0;color:#cdd2d4;font:11px/1.35 Arial,sans-serif!important;text-align:center;display:block}
#loadingScreen .wet-splash-loader .brand-loading-tip strong{display:inline;color:#f2bd3f;margin-right:5px}
#loadingScreen .wet-splash-loader .brand-loading-tip p{display:inline;margin:0;color:#cdd2d4}

/* --- One visual identity for all pre-login/document screens --- */
body.vav-document-mode{
  background:
    radial-gradient(circle at 50% 7%,rgba(255,194,51,.08),transparent 31%),
    linear-gradient(145deg,#333a40 0%,#293036 47%,#23292e 100%)!important;
  background-attachment:fixed!important;
  color:#e9e2d5!important;
}
body.vav-document-mode::before{
  content:"";position:fixed;inset:0;pointer-events:none;opacity:.1;z-index:0;
  background:repeating-linear-gradient(104deg,transparent 0 33px,rgba(255,255,255,.18) 34px,transparent 35px 69px);
}
body.vav-document-mode .auth-flow-screen{position:relative;z-index:1}
body.vav-document-mode .auth-flow-screen .login-window{
  border:1px solid rgba(212,184,111,.34)!important;
  border-radius:18px!important;
  overflow:hidden!important;
  background:linear-gradient(180deg,rgba(53,60,66,.98),rgba(39,45,50,.99))!important;
  box-shadow:0 24px 60px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.045)!important;
  color:#e9e2d5!important;
}
body.vav-document-mode .auth-flow-screen .titlebar{
  position:sticky!important;top:0!important;z-index:5!important;
  min-height:44px!important;height:auto!important;
  display:flex!important;align-items:center!important;
  padding:9px 13px!important;border:0!important;border-bottom:1px solid rgba(220,187,102,.22)!important;
  background:linear-gradient(180deg,#3d454c 0%,#30373d 100%)!important;
  color:#f3d889!important;text-shadow:none!important;
  font:700 12px/1.2 "Courier New",Consolas,monospace!important;
  letter-spacing:.03em!important;
}
body.vav-document-mode .auth-flow-screen .qip-logo{display:inline-grid;place-items:center;min-width:27px;height:27px;margin-right:7px;border-radius:8px;background:#242a2f;color:#f4be3f!important;border:1px solid rgba(235,193,82,.28);font-size:15px!important}
body.vav-document-mode .auth-flow-screen .padded{padding:18px 20px 20px!important;background:transparent!important;color:#e5ded0!important}
.auth-brand-hero{display:flex;align-items:center;justify-content:center;gap:13px;margin:0 0 14px;padding:12px;border:1px solid rgba(222,190,108,.2);border-radius:15px;background:linear-gradient(135deg,rgba(29,34,39,.78),rgba(55,62,68,.58));box-shadow:inset 0 1px rgba(255,255,255,.025)}
.auth-brand-hero img{width:58px;height:58px;border-radius:16px;box-shadow:0 7px 18px rgba(0,0,0,.28)}
.auth-brand-name{color:#f2c247;font:800 25px/1 "Courier New",Consolas,monospace;letter-spacing:.02em}
.auth-brand-tagline{margin-top:5px;color:#dfd8c9;font:600 11px/1.2 "Courier New",Consolas,monospace;letter-spacing:.09em}
body.vav-document-mode .auth-flow-screen h1,body.vav-document-mode .auth-flow-screen h2{color:#f4eddd!important;text-shadow:none!important;line-height:1.18!important}
body.vav-document-mode .auth-flow-screen h1{font-size:22px!important;text-align:center;margin:7px 0 11px!important}
body.vav-document-mode .auth-flow-screen h2{font-size:19px!important}
body.vav-document-mode .auth-flow-screen p,body.vav-document-mode .auth-flow-screen .small-muted{color:#cbd0d2!important}
body.vav-document-mode .retro-system-line{border:1px solid rgba(222,190,108,.19)!important;border-radius:11px!important;background:#252b30!important;color:#d4d8d9!important;padding:9px 11px!important}
body.vav-document-mode .retro-led{box-shadow:0 0 8px #61bd56!important}
body.vav-document-mode .login-help-card,body.vav-document-mode .public-link-box,body.vav-document-mode .notice{
  border:1px solid rgba(224,191,105,.2)!important;border-radius:12px!important;
  background:linear-gradient(180deg,#363e44,#2d3439)!important;color:#dce0df!important;box-shadow:none!important;
}
body.vav-document-mode .login-help-card strong{color:#f0c34d!important}
body.vav-document-mode .login-help-card span,body.vav-document-mode .notice{color:#cdd1d0!important}
body.vav-document-mode .field-label{color:#d8d4c9!important;font-weight:700!important}
body.vav-document-mode .qip-input{
  min-height:44px!important;border:1px solid #596168!important;border-radius:10px!important;
  background:#252b30!important;color:#f2eee5!important;box-shadow:inset 0 1px 3px rgba(0,0,0,.24)!important;
  caret-color:#ffc744!important;
}
body.vav-document-mode .qip-input::placeholder{color:#858d91!important}
body.vav-document-mode .qip-input:focus{border-color:#d1a33a!important;outline:2px solid rgba(218,169,55,.12)!important;box-shadow:0 0 0 3px rgba(218,169,55,.08)!important}
body.vav-document-mode .auth-tabs{padding:4px!important;border:1px solid rgba(222,190,108,.2)!important;border-radius:12px!important;background:#252b30!important}
body.vav-document-mode .auth-tab{min-height:40px!important;border-radius:9px!important;color:#bcc2c4!important;background:transparent!important}
body.vav-document-mode .auth-tab.active{border:1px solid rgba(226,186,83,.38)!important;background:linear-gradient(180deg,#4a4331,#37352f)!important;color:#ffd15a!important;box-shadow:none!important}
body.vav-document-mode .primary{
  min-height:45px!important;border:1px solid #dbab35!important;border-radius:11px!important;
  background:linear-gradient(180deg,#ffd45b,#e9ae2f)!important;color:#1d1f20!important;text-shadow:none!important;font-weight:800!important;
  box-shadow:0 8px 20px rgba(0,0,0,.2),inset 0 1px rgba(255,255,255,.38)!important;
}
body.vav-document-mode .primary:hover{background:linear-gradient(180deg,#ffdf75,#f0bb3d)!important}
body.vav-document-mode .secondary{min-height:42px!important;border:1px solid #626a70!important;border-radius:10px!important;background:#343b41!important;color:#e1ddd2!important;text-shadow:none!important;box-shadow:none!important}
body.vav-document-mode .secondary:hover{border-color:#8b7848!important;background:#3c4348!important}
body.vav-document-mode .link-button{color:#e4bd58!important;text-decoration:none!important}
body.vav-document-mode .link-button:hover{text-decoration:underline!important;color:#ffd86a!important}
body.vav-document-mode .retro-auth-footer{margin-top:14px!important;padding-top:11px!important;border-top:1px solid rgba(222,190,108,.16)!important;color:#999f9f!important;text-align:center!important;font:10px/1.35 "Courier New",Consolas,monospace!important;letter-spacing:.04em!important}
body.vav-document-mode .big-icon{filter:saturate(.6);opacity:.9}

@media(max-width:700px){
  .wet-splash-brand{margin-top:-3vh;padding:16px}
  .wet-splash-logo{width:102px}
  .wet-splash-wordmark{font-size:34px}
  .wet-splash-tagline{font-size:13px}
  .wet-splash-road{bottom:23%;height:15%}
  .wet-splash-loader{width:calc(100% - 18px);margin-bottom:max(8px,env(safe-area-inset-bottom));padding:10px 10px 9px;border-radius:15px}
  .wet-loader-ring{width:50px;height:50px}.wet-loader-ring img{width:28px;height:28px}.wet-loader-ring i{left:23px;top:2px;transform-origin:2px 23px}
  body.vav-document-mode .auth-flow-screen{padding:8px 5px 20px!important}
  body.vav-document-mode .auth-flow-screen .login-window{border-radius:15px!important}
  body.vav-document-mode .auth-flow-screen .padded{padding:13px!important}
  .auth-brand-hero{padding:10px;margin-bottom:11px}.auth-brand-hero img{width:48px;height:48px}.auth-brand-name{font-size:21px}.auth-brand-tagline{font-size:10px}
  body.vav-document-mode .auth-flow-screen h1{font-size:19px!important}
  body.vav-document-mode .login-help{gap:7px!important;margin:8px 0 10px!important}
}
@media(max-width:390px){
  .wet-splash-wordmark{font-size:30px}.wet-splash-tagline{font-size:11px}
  #loadingScreen .wet-splash-loader .brand-loading-tip{font-size:9.8px!important}
  body.vav-document-mode .auth-brand-hero{justify-content:flex-start}
}
@media(prefers-reduced-motion:reduce){.wet-loader-ring i{animation:none!important}}

/* =========================================================
   vAvtobyse 2.9.16 — Theme Pack Part 3
   Chat list + open chat visual polish only.
   Keeps the same DOM, actions and bus icon system in every theme.
   ========================================================= */

/* Shared shell: same geometry and icon family across every theme. */
html[data-theme] .app{
  background:var(--th-body)!important;
  gap:10px!important;
  padding:10px!important;
}
html[data-theme] .contacts-window,
html[data-theme] .chat-window{
  border:1px solid color-mix(in srgb,var(--th-border) 82%,transparent)!important;
  border-radius:18px!important;
  overflow:hidden!important;
  background:var(--th-panel)!important;
  box-shadow:var(--th-shadow)!important;
}
html[data-theme] .app-titlebar{
  min-height:42px!important;
  height:42px!important;
  padding:0 12px!important;
  border:0!important;
  border-bottom:1px solid var(--th-border)!important;
  background:linear-gradient(180deg,var(--th-title-a),var(--th-title-b))!important;
}
html[data-theme] .desktop-app-name{
  color:var(--th-title-text)!important;
  font:800 14px/1 "Courier New",Consolas,monospace!important;
  letter-spacing:.03em!important;
}
html[data-theme] .version-mark{opacity:.62!important;font-size:9px!important}

/* Chat/contacts tabs and list header */
html[data-theme] .list-heading{
  min-height:47px!important;
  padding:6px 8px!important;
  border:0!important;
  border-bottom:1px solid var(--th-border)!important;
  background:var(--th-panel-alt)!important;
}
html[data-theme] .sidebar-tabs{gap:6px!important}
html[data-theme] .sidebar-tab{
  height:34px!important;
  border:1px solid var(--th-border)!important;
  border-radius:10px!important;
  background:var(--th-button-a)!important;
  color:var(--th-text)!important;
  box-shadow:none!important;
  padding:4px 8px!important;
}
html[data-theme] .sidebar-tab:hover{background:var(--th-hover)!important}
html[data-theme] .sidebar-tab.active{
  background:var(--th-selected)!important;
  color:var(--th-text)!important;
  border-color:var(--th-accent)!important;
  outline:0!important;
  box-shadow:inset 3px 0 0 var(--th-accent)!important;
}
html[data-theme] .sidebar-tab img{filter:var(--th-icon-filter)!important}
html[data-theme] .sidebar-tab b{
  border:0!important;border-radius:999px!important;
  min-width:22px!important;height:20px!important;padding:0 6px!important;
  display:grid!important;place-items:center!important;
  background:var(--th-panel-strong)!important;color:var(--th-muted)!important;
  font-size:10px!important;
}
html[data-theme] .sidebar-tab.active b{background:var(--th-accent)!important;color:var(--th-primary-text)!important}
html[data-theme] .mini-refresh{
  width:34px!important;height:34px!important;border-radius:10px!important;
  border:1px solid var(--th-border)!important;background:var(--th-button-a)!important;
  box-shadow:none!important;
}
html[data-theme] .mini-refresh img{filter:var(--th-icon-filter)!important}

/* Chat list: calm, roomy and consistent. */
html[data-theme] .conversation-list{
  background:var(--th-panel)!important;
  padding:5px!important;
  scrollbar-color:var(--th-panel-strong) transparent;
}
html[data-theme] .conversation-item{
  width:100%!important;
  min-height:68px!important;
  grid-template-columns:50px minmax(0,1fr) auto!important;
  gap:10px!important;
  margin:0 0 4px!important;
  padding:8px 10px!important;
  border:1px solid transparent!important;
  border-radius:12px!important;
  background:transparent!important;
  color:var(--th-text)!important;
  box-shadow:none!important;
}
html[data-theme] .conversation-item:hover{
  background:var(--th-hover)!important;
  color:var(--th-text)!important;
  border-color:color-mix(in srgb,var(--th-border) 70%,transparent)!important;
}
html[data-theme] .conversation-item.selected{
  background:var(--th-selected)!important;
  color:var(--th-text)!important;
  border-color:color-mix(in srgb,var(--th-accent) 62%,var(--th-border))!important;
  outline:0!important;
  box-shadow:inset 3px 0 0 var(--th-accent)!important;
}
html[data-theme] .conversation-item .avatar{
  width:46px!important;height:46px!important;border-radius:12px!important;
  border:1px solid color-mix(in srgb,var(--th-border) 85%,transparent)!important;
  background:var(--th-panel-alt)!important;
  box-shadow:0 3px 9px rgba(0,0,0,.11)!important;
}
html[data-theme] .conversation-title{color:var(--th-text)!important;font-weight:800!important;font-size:13px!important}
html[data-theme] .conversation-preview{color:var(--th-muted)!important;line-height:1.3!important;margin-top:3px!important}
html[data-theme] .conversation-list-time{color:var(--th-muted)!important;font-size:10px!important;font-variant-numeric:tabular-nums!important}
html[data-theme] .conversation-item.selected .conversation-preview,
html[data-theme] .conversation-item.selected .conversation-list-time{color:var(--th-muted)!important}
html[data-theme] .conversation-item.has-unread{
  background:color-mix(in srgb,var(--th-accent) 7%,var(--th-panel))!important;
}
html[data-theme] .conversation-item.has-unread .conversation-title{color:var(--th-text)!important}
html[data-theme] .unread-envelope-badge{transform:scale(.9);transform-origin:right center}

/* Open chat header. */
html[data-theme] .chat-header{
  min-height:66px!important;
  padding:8px 12px!important;
  grid-template-columns:48px minmax(0,1fr) auto!important;
  gap:10px!important;
  border:0!important;
  border-bottom:1px solid var(--th-border)!important;
  background:linear-gradient(180deg,var(--th-panel-alt),var(--th-panel))!important;
  color:var(--th-text)!important;
}
html[data-theme] .chat-header .avatar-large{
  width:46px!important;height:46px!important;border-radius:13px!important;
  border:1px solid var(--th-border)!important;background:var(--th-panel-alt)!important;
}
html[data-theme] .chat-title{color:var(--th-text)!important;font-size:15px!important;font-weight:800!important}
html[data-theme] .chat-header-main{min-width:0!important}
html[data-theme] .chat-info-button,
html[data-theme] .mobile-back-button{
  border:1px solid var(--th-border)!important;border-radius:10px!important;
  background:var(--th-button-a)!important;color:var(--th-text)!important;box-shadow:none!important;
}
html[data-theme] .chat-info-button:hover,
html[data-theme] .mobile-back-button:hover{background:var(--th-hover)!important}
html[data-theme] .chat-info-button img,
html[data-theme] .mobile-back-button img{filter:var(--th-icon-filter)!important}

/* Message canvas. Same structure in every theme, surfaces driven by theme variables. */
html[data-theme] .message-list{
  position:relative!important;
  padding:16px 18px 18px!important;
  background:var(--th-chat)!important;
  scroll-padding-bottom:20px!important;
}
html[data-theme] .message-list::before{
  content:"";
  position:fixed;
  pointer-events:none;
  opacity:.045;
  width:420px;height:210px;
  right:8%;bottom:150px;
  background:
    linear-gradient(transparent 0 67%,currentColor 68% 70%,transparent 71%),
    linear-gradient(90deg,transparent 0 9%,currentColor 10% 14%,transparent 15% 22%,currentColor 23% 31%,transparent 32% 43%,currentColor 44% 49%,transparent 50% 61%,currentColor 62% 73%,transparent 74%);
  color:var(--th-accent);
  mask:linear-gradient(180deg,transparent,#000 45%,#000);
}
html[data-theme] .message-row{
  grid-template-columns:34px minmax(0,1fr)!important;
  gap:9px!important;
  margin-bottom:11px!important;
}
html[data-theme] .message-row .avatar{
  width:32px!important;height:32px!important;border-radius:10px!important;
  border:1px solid color-mix(in srgb,var(--th-border) 80%,transparent)!important;
}
html[data-theme] .message-meta{margin:0 0 4px!important;font-size:10px!important;color:var(--th-muted)!important}
html[data-theme] .message-author{color:var(--th-accent)!important;font-weight:800!important}
html[data-theme] .message-time{color:var(--th-muted)!important}
html[data-theme] .message-bubble{
  max-width:min(720px,86%)!important;
  padding:9px 11px!important;
  border:1px solid color-mix(in srgb,var(--th-border) 86%,transparent)!important;
  border-radius:12px 12px 12px 4px!important;
  background:var(--th-message)!important;
  color:var(--th-text)!important;
  box-shadow:0 4px 12px rgba(0,0,0,.08)!important;
  line-height:1.45!important;
}
html[data-theme] .message-row.mine .message-bubble{
  border-color:color-mix(in srgb,var(--th-accent) 42%,var(--th-border))!important;
  border-radius:12px 12px 4px 12px!important;
  background:var(--th-message-mine)!important;
}
html[data-theme] .message-day{
  width:max-content!important;max-width:90%!important;
  margin:8px auto 15px!important;padding:5px 10px!important;
  border:1px solid color-mix(in srgb,var(--th-border) 75%,transparent)!important;
  border-radius:999px!important;background:color-mix(in srgb,var(--th-panel) 88%,transparent)!important;
  color:var(--th-muted)!important;font-size:10px!important;
  backdrop-filter:blur(8px)!important;
}
html[data-theme] .file-card{
  border-color:var(--th-border)!important;border-radius:9px!important;
  background:var(--th-panel-alt)!important;color:var(--th-text)!important;
}
html[data-theme] .image-message{border-radius:10px!important;border-color:var(--th-border)!important}

/* Composer: one compact branded rail instead of a pile of unrelated controls. */
html[data-theme] .composer{
  border:0!important;border-top:1px solid var(--th-border)!important;
  background:var(--th-panel)!important;
}
html[data-theme] .composer-recipient{
  min-height:32px!important;padding:4px 10px!important;
  border:0!important;border-bottom:1px solid color-mix(in srgb,var(--th-border) 70%,transparent)!important;
  background:var(--th-panel-alt)!important;color:var(--th-muted)!important;
}
html[data-theme] .composer-toolbar{
  min-height:43px!important;padding:5px 8px!important;gap:5px!important;
  border:0!important;border-bottom:1px solid color-mix(in srgb,var(--th-border) 72%,transparent)!important;
  background:var(--th-panel-alt)!important;
}
html[data-theme] .composer-toolbar .tool-button{
  width:34px!important;height:32px!important;padding:6px!important;
  border:1px solid transparent!important;border-radius:9px!important;
  background:transparent!important;box-shadow:none!important;
}
html[data-theme] .composer-toolbar .tool-button:hover{
  border-color:var(--th-border)!important;background:var(--th-hover)!important;
}
html[data-theme] .composer-toolbar .button-icon{width:19px!important;height:19px!important;filter:var(--th-icon-filter)!important}
html[data-theme] .composer-tip{color:var(--th-muted)!important;opacity:.72!important}
html[data-theme] .composer-row{gap:8px!important;padding:8px!important;align-items:stretch!important}
html[data-theme] .composer-input-shell{
  border:1px solid var(--th-border)!important;border-radius:12px!important;
  background:var(--th-input)!important;overflow:hidden!important;
}
html[data-theme] .composer textarea{
  min-height:52px!important;max-height:132px!important;
  padding:11px 12px!important;border:0!important;border-radius:0!important;
  background:transparent!important;color:var(--th-text)!important;box-shadow:none!important;resize:none!important;
}
html[data-theme] .composer textarea:focus{outline:0!important;box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--th-accent) 55%,transparent)!important}
html[data-theme] .send-button{
  min-width:106px!important;min-height:52px!important;
  padding:0 15px!important;border:1px solid color-mix(in srgb,var(--th-accent) 70%,var(--th-border))!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,var(--th-primary-a),var(--th-primary-b))!important;
  color:var(--th-primary-text)!important;box-shadow:none!important;font-weight:800!important;
}
html[data-theme] .send-button:hover{filter:brightness(1.05)}
html[data-theme] .send-icon-image{filter:none!important}

/* Theme 1 flagship: wet asphalt + warm yellow, matching the approved board. */
html[data-theme="bus-past"] .contacts-window,
html[data-theme="bus-past"] .chat-window{
  border-color:rgba(224,182,78,.22)!important;
  box-shadow:0 16px 44px rgba(8,12,15,.30),inset 0 1px rgba(255,255,255,.025)!important;
}
html[data-theme="bus-past"] .conversation-item.selected{
  background:linear-gradient(90deg,rgba(226,182,78,.16),rgba(226,182,78,.05))!important;
  border-color:rgba(226,182,78,.32)!important;
}
html[data-theme="bus-past"] .message-list{
  background:
    radial-gradient(circle at 72% 12%,rgba(226,182,78,.045),transparent 25%),
    linear-gradient(180deg,#2e383d,#293237 72%,#252e33)!important;
}
html[data-theme="bus-past"] .message-bubble{
  background:#394247!important;border-color:#535d60!important;color:#eee5d4!important;
}
html[data-theme="bus-past"] .message-row.mine .message-bubble{
  background:linear-gradient(145deg,#5c4e2c,#4b422d)!important;
  border-color:#85703b!important;color:#f6ecd7!important;
}
html[data-theme="bus-past"] .composer-input-shell{background:#273136!important;border-color:#565f61!important}
html[data-theme="bus-past"] .composer textarea{color:#f2e9d8!important}
html[data-theme="bus-past"] .composer textarea::placeholder{color:#918c80!important}

/* Windows theme changes chrome only; geometry/icons remain exactly the same. */
html[data-theme="win98"] .contacts-window,
html[data-theme="win98"] .chat-window,
html[data-theme="win98"] .sidebar-tab,
html[data-theme="win98"] .mini-refresh,
html[data-theme="win98"] .chat-info-button,
html[data-theme="win98"] .mobile-back-button,
html[data-theme="win98"] .composer-input-shell,
html[data-theme="win98"] .send-button{
  border-radius:0!important;
}
html[data-theme="win98"] .contacts-window,
html[data-theme="win98"] .chat-window{border:2px outset #fff!important;box-shadow:3px 3px 0 rgba(0,0,0,.22)!important}
html[data-theme="win98"] .app-titlebar{border-radius:0!important;background:linear-gradient(90deg,#0755b5,#2588e7)!important}
html[data-theme="win98"] .sidebar-tab.active{box-shadow:inset 3px 0 0 #0755b5!important}

/* Mobile: retain same visual language, just flatten the shell to one screen. */
@media(max-width:820px){
  html[data-theme] .app{padding:0!important;gap:0!important;background:var(--th-panel)!important}
  html[data-theme] .contacts-window,
  html[data-theme] .chat-window{border:0!important;border-radius:0!important;box-shadow:none!important}
  html[data-theme] .list-heading{min-height:44px!important;padding:5px 7px!important}
  html[data-theme] .conversation-list{padding:4px 5px calc(76px + env(safe-area-inset-bottom))!important}
  html[data-theme] .conversation-item{min-height:66px!important;grid-template-columns:48px minmax(0,1fr) auto!important;padding:7px 8px!important;border-radius:11px!important}
  html[data-theme] .conversation-item .avatar{width:44px!important;height:44px!important}
  html[data-theme] .chat-header{min-height:58px!important;padding:6px 8px!important;grid-template-columns:42px minmax(0,1fr) auto!important}
  html[data-theme] .chat-header .avatar-large{width:40px!important;height:40px!important;border-radius:11px!important}
  html[data-theme] .message-list{padding:11px 9px 14px!important}
  html[data-theme] .message-list::before{display:none!important}
  html[data-theme] .message-row{grid-template-columns:28px minmax(0,1fr)!important;gap:6px!important;margin-bottom:9px!important}
  html[data-theme] .message-row .avatar{width:27px!important;height:27px!important;border-radius:8px!important}
  html[data-theme] .message-bubble{max-width:91%!important;padding:8px 9px!important;border-radius:11px 11px 11px 4px!important;font-size:13px!important}
  html[data-theme] .message-row.mine .message-bubble{border-radius:11px 11px 4px 11px!important}
  html[data-theme] .composer-recipient{min-height:28px!important;padding:3px 8px!important;font-size:10px!important}
  html[data-theme] .composer-toolbar{display:none!important}
  html[data-theme] .composer-row{padding:6px max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))!important;gap:6px!important}
  html[data-theme] .composer-input-shell{border-radius:18px!important}
  html[data-theme] .composer textarea{min-height:44px!important;max-height:116px!important;padding:11px 42px!important;font-size:16px!important}
  html[data-theme] .mobile-composer-inline{background:transparent!important;border:0!important;box-shadow:none!important}
  html[data-theme] .mobile-composer-inline img{filter:var(--th-icon-filter)!important}
  html[data-theme] .send-button{min-width:48px!important;width:48px!important;min-height:44px!important;height:44px!important;padding:0!important;border-radius:50%!important}
  html[data-theme] .send-button .button-label{display:none!important}
}

@media(max-width:380px){
  html[data-theme] .conversation-item{grid-template-columns:43px minmax(0,1fr) auto!important;gap:7px!important}
  html[data-theme] .conversation-item .avatar{width:40px!important;height:40px!important}
  html[data-theme] .message-bubble{max-width:94%!important}
}


/* =========================================================
   vAvtobyse 2.9.17 — STATUS BUS VARIANT C MASTER LOCK
   Exact crops from the approved Variant C control sheet.
   Do not redraw these icons per theme. Themes affect chrome only.
   ========================================================= */
.bus-presence{
  width:32px!important;height:35px!important;flex:0 0 32px!important;
  overflow:visible!important;background:transparent!important;border:0!important;
}
.bus-presence-svg.status-bus-c-image{
  display:block!important;width:32px!important;height:35px!important;max-width:none!important;
  object-fit:cover!important;object-position:center!important;
  border-radius:4px!important;background:#0b1115!important;
  box-shadow:0 1px 2px rgba(0,0,0,.42)!important;
  filter:none!important;image-rendering:auto!important;
}
.status-preset::before{
  width:38px!important;height:42px!important;flex:0 0 38px!important;
  border-radius:5px!important;background-color:#0b1115!important;
  background-size:cover!important;background-position:center!important;
  box-shadow:0 1px 2px rgba(0,0,0,.40)!important;
  filter:none!important;image-rendering:auto!important;
}
.status-preset[data-activity="available"]::before{background-image:url("status-buses/master-c/available.png?v=2.9.18-visual-part4")!important}
.status-preset[data-activity="work"]::before{background-image:url("status-buses/master-c/work.png?v=2.9.18-visual-part4")!important}
.status-preset[data-activity="home"]::before{background-image:url("status-buses/master-c/home.png?v=2.9.18-visual-part4")!important}
.status-preset[data-activity="sleep"]::before{background-image:url("status-buses/master-c/sleep.png?v=2.9.18-visual-part4")!important}
.status-preset[data-activity="road"]::before{background-image:url("status-buses/master-c/road.png?v=2.9.18-visual-part4")!important}
.status-preset[data-activity="dnd"]::before{background-image:url("status-buses/master-c/dnd.png?v=2.9.18-visual-part4")!important}
.status-preset[data-tone="red"]::before,.status-preset[data-activity="offline"]::before{background-image:url("status-buses/master-c/offline.png?v=2.9.18-visual-part4")!important}
.activity-preview .bus-presence{width:56px!important;height:62px!important;flex-basis:56px!important}
.activity-preview .bus-presence-svg.status-bus-c-image{width:56px!important;height:62px!important;border-radius:7px!important}
.chat-title-line .bus-presence{width:34px!important;height:37px!important;flex-basis:34px!important}
.chat-title-line .status-bus-c-image{width:34px!important;height:37px!important}
.conversation-bus-presence .bus-presence{width:34px!important;height:37px!important;flex-basis:34px!important}
@media(max-width:820px){
  .bus-presence{width:29px!important;height:32px!important;flex-basis:29px!important}
  .bus-presence-svg.status-bus-c-image{width:29px!important;height:32px!important;border-radius:4px!important}
  .chat-title-line .bus-presence{width:31px!important;height:34px!important;flex-basis:31px!important}
  .chat-title-line .status-bus-c-image{width:31px!important;height:34px!important}
  .status-preset::before{width:36px!important;height:40px!important;flex-basis:36px!important}
}

/* =========================================================
   vAvtobyse 2.9.18 — VISUAL PART 4
   Profile + Contacts + Groups + Settings
   Visual-only pass. Same bus/UI icon system in every theme.
   ========================================================= */

/* All inner app pages use one branded modal shell. */
html[data-theme] .modal-backdrop{
  background:rgba(7,11,14,.58)!important;
  backdrop-filter:blur(7px) saturate(.88)!important;
}
html[data-theme] .modal{
  width:min(700px,calc(100vw - 30px))!important;
  border:1px solid color-mix(in srgb,var(--th-border) 82%,transparent)!important;
  border-radius:16px!important;
  overflow:auto!important;
  background:var(--th-panel)!important;
  box-shadow:0 22px 70px rgba(0,0,0,.38),var(--th-shadow)!important;
}
html[data-theme] .modal-titlebar{
  min-height:52px!important;
  display:flex!important;align-items:center!important;gap:9px!important;
  padding:6px 13px 6px 7px!important;
  border-bottom:1px solid color-mix(in srgb,var(--th-border) 82%,transparent)!important;
  background:linear-gradient(180deg,var(--th-panel-strong),var(--th-panel-alt))!important;
  color:var(--th-text)!important;
  font-size:14px!important;font-weight:800!important;letter-spacing:.01em!important;
}
/* One master bus identity instead of assorted emoji icons in modal headers. */
html[data-theme] .modal-titlebar .qip-logo{
  width:31px!important;height:34px!important;min-width:31px!important;
  border:0!important;border-radius:5px!important;box-shadow:none!important;
  background:transparent url("status-buses/master-c/work.png?v=2.9.18-visual-part4") center/cover no-repeat!important;
  color:transparent!important;font-size:0!important;text-shadow:none!important;filter:none!important;
}
html[data-theme] .modal-nav-back{
  width:38px!important;height:38px!important;min-width:38px!important;
  border:1px solid var(--th-border)!important;border-radius:10px!important;
  background:var(--th-button-a)!important;color:var(--th-text)!important;
  box-shadow:none!important;font-size:31px!important;line-height:28px!important;
}
html[data-theme] .modal-nav-back:hover{background:var(--th-hover)!important;border-color:var(--th-accent)!important}
html[data-theme] .modal>.padded{padding:16px!important}
html[data-theme] .modal-actions{
  position:sticky!important;bottom:0!important;z-index:3!important;
  padding:10px 13px!important;
  border-top:1px solid var(--th-border)!important;
  background:color-mix(in srgb,var(--th-panel) 94%,transparent)!important;
  backdrop-filter:blur(12px)!important;
}
html[data-theme] .modal-actions button{min-height:40px!important;border-radius:10px!important;padding-inline:16px!important}

/* Profile/account home: turn the old form stack into a calm settings dashboard. */
html[data-theme] .account-modal{width:min(720px,calc(100vw - 30px))!important}
html[data-theme] .account-summary{
  grid-template-columns:88px minmax(0,1fr)!important;gap:16px!important;
  margin:0 0 16px!important;padding:14px!important;
  border:1px solid var(--th-border)!important;border-radius:14px!important;
  background:linear-gradient(135deg,var(--th-panel-alt),color-mix(in srgb,var(--th-panel-strong) 70%,var(--th-panel)))!important;
}
html[data-theme] .account-summary .avatar-xl,
html[data-theme] .public-profile-head .avatar-xl,
html[data-theme] .avatar-editor .avatar-xl{
  width:78px!important;height:78px!important;min-width:78px!important;
  border:1px solid color-mix(in srgb,var(--th-accent) 38%,var(--th-border))!important;
  border-radius:18px!important;background:var(--th-input)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.16)!important;
}
html[data-theme] .account-summary .profile-name{font-size:20px!important;font-weight:850!important;color:var(--th-text)!important}
html[data-theme] .account-id{display:inline-block!important;margin:5px 8px 0 0!important;color:var(--th-muted)!important;font-size:11px!important}
html[data-theme] .account-id b{color:var(--th-accent)!important}
html[data-theme] .account-actions{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important;margin-top:16px!important;
}
html[data-theme] .account-action-tile{
  min-height:76px!important;display:grid!important;grid-template-columns:34px minmax(0,1fr)!important;
  align-items:center!important;gap:10px!important;padding:12px!important;
  border:1px solid var(--th-border)!important;border-radius:13px!important;
  background:var(--th-panel-alt)!important;box-shadow:none!important;text-align:left!important;
}
html[data-theme] .account-action-tile:hover{transform:translateY(-1px)!important;border-color:color-mix(in srgb,var(--th-accent) 55%,var(--th-border))!important}
html[data-theme] .account-action-icon{width:25px!important;height:25px!important;opacity:.95!important}
html[data-theme] .account-action-label{font-size:12px!important;font-weight:750!important;line-height:1.25!important}
html[data-theme] .account-action-tile.danger-text{border-color:color-mix(in srgb,#d65a5a 42%,var(--th-border))!important}

/* Public profile + edit profile use the same visual cards. */
html[data-theme] .user-profile-modal{width:min(650px,calc(100vw - 30px))!important}
html[data-theme] .public-profile-head{
  grid-template-columns:90px minmax(0,1fr)!important;gap:16px!important;
  padding:14px!important;border:1px solid var(--th-border)!important;border-radius:14px!important;
  background:var(--th-panel-alt)!important;
}
html[data-theme] .public-profile-login{font:750 12px ui-monospace,SFMono-Regular,Consolas,monospace!important;color:var(--th-accent)!important}
html[data-theme] .public-profile-head h2{margin:3px 0 5px!important;font-size:20px!important;color:var(--th-text)!important}
html[data-theme] .profile-questionnaire{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;margin-top:12px!important}
html[data-theme] .profile-questionnaire>div{
  min-height:62px!important;padding:11px!important;
  border:1px solid var(--th-border)!important;border-radius:11px!important;
  background:var(--th-panel-alt)!important;
}
html[data-theme] .profile-questionnaire span{margin-bottom:5px!important;color:var(--th-muted)!important;text-transform:uppercase!important;letter-spacing:.055em!important;font-size:9px!important}
html[data-theme] .profile-questionnaire b{color:var(--th-text)!important;font-size:12px!important}
html[data-theme] .profile-questionnaire p{color:var(--th-text)!important;line-height:1.5!important}
html[data-theme] .avatar-editor{
  padding:12px!important;margin-bottom:13px!important;border:1px solid var(--th-border)!important;
  border-radius:13px!important;background:var(--th-panel-alt)!important;
}
html[data-theme] .field-label{display:block!important;margin:11px 0 5px!important;color:var(--th-muted)!important;font-size:10px!important;font-weight:750!important;letter-spacing:.025em!important}
html[data-theme] .qip-input,
html[data-theme] .profile-textarea,
html[data-theme] .group-description-input{
  border:1px solid var(--th-border)!important;border-radius:10px!important;box-shadow:none!important;
}
html[data-theme] .qip-input:focus,
html[data-theme] .profile-textarea:focus,
html[data-theme] .group-description-input:focus{
  outline:0!important;border-color:var(--th-accent)!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--th-accent) 20%,transparent)!important;
}

/* Contacts/search/pickers: same row geometry as chat list. */
html[data-theme] .search-result,
html[data-theme] .contact-picker-list{
  padding:5px!important;border:1px solid var(--th-border)!important;border-radius:11px!important;
  background:var(--th-panel-alt)!important;box-shadow:none!important;
}
html[data-theme] .contact-picker-row{
  grid-template-columns:22px 46px minmax(0,1fr)!important;gap:9px!important;
  min-height:60px!important;padding:6px 8px!important;
  border:1px solid transparent!important;border-radius:10px!important;background:transparent!important;
}
html[data-theme] .contact-picker-row:hover{background:var(--th-hover)!important}
html[data-theme] .contact-picker-row.selected{background:var(--th-selected)!important;border-color:var(--th-accent)!important;outline:0!important}
html[data-theme] .contact-picker-avatar{width:42px!important;height:42px!important;border-radius:12px!important}
html[data-theme] .contact-picker-info strong{color:var(--th-text)!important;font-size:12px!important}
html[data-theme] .contact-picker-info span{color:var(--th-muted)!important}
html[data-theme] .selected-contacts-summary{margin:8px 0!important;padding:8px 10px!important;border-radius:9px!important;background:var(--th-panel-alt)!important;color:var(--th-muted)!important;border:1px solid var(--th-border)!important}

/* Group creation/management becomes a sectioned settings page, not a legacy form. */
html[data-theme] .group-manage-modal{width:min(780px,calc(100vw - 30px))!important}
html[data-theme] .group-role-card{
  margin:0 0 10px!important;padding:10px 12px!important;border:1px solid var(--th-border)!important;
  border-radius:11px!important;background:var(--th-selected)!important;color:var(--th-text)!important;
}
html[data-theme] .group-section-title{
  margin:14px 0 7px!important;color:var(--th-accent)!important;
  font-size:11px!important;font-weight:850!important;text-transform:uppercase!important;letter-spacing:.05em!important;
}
html[data-theme] .group-overview-card,
html[data-theme] .group-pinned-settings,
html[data-theme] .group-media-box,
html[data-theme] .group-info-controls,
html[data-theme] .group-permissions-box,
html[data-theme] .group-invite-box,
html[data-theme] .group-add-box{
  margin:0 0 11px!important;padding:12px!important;
  border:1px solid var(--th-border)!important;border-radius:12px!important;
  background:var(--th-panel-alt)!important;color:var(--th-text)!important;
}
html[data-theme] .group-add-box{border-top:1px solid var(--th-border)!important}
html[data-theme] .group-avatar-editor{
  padding:11px!important;border:1px solid var(--th-border)!important;border-radius:11px!important;
  background:var(--th-panel-strong)!important;
}
html[data-theme] .group-media-shortcuts{gap:7px!important}
html[data-theme] .group-media-shortcuts button{
  min-height:46px!important;border-radius:10px!important;text-align:center!important;
}
html[data-theme] .group-permission-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
html[data-theme] .group-permission-grid label{
  padding:9px!important;border:1px solid var(--th-border)!important;border-radius:10px!important;background:var(--th-panel-strong)!important;
}
html[data-theme] .group-invite-options{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
html[data-theme] .members-list{
  display:grid!important;gap:5px!important;min-height:70px!important;padding:4px!important;
  border:1px solid var(--th-border)!important;border-radius:11px!important;background:var(--th-panel-alt)!important;
}
html[data-theme] .member-row{
  grid-template-columns:42px minmax(0,1fr) auto!important;gap:9px!important;
  padding:8px!important;border:1px solid transparent!important;border-radius:9px!important;background:transparent!important;
}
html[data-theme] .member-row:hover{background:var(--th-hover)!important}
html[data-theme] .member-row .avatar{width:40px!important;height:40px!important;border-radius:11px!important}
html[data-theme] .member-name{color:var(--th-text)!important;font-weight:800!important}
html[data-theme] .member-role{margin-left:5px!important;border:1px solid var(--th-border)!important;background:var(--th-panel-strong)!important;color:var(--th-muted)!important}
html[data-theme] .member-role.owner{background:color-mix(in srgb,var(--th-accent) 23%,var(--th-panel-alt))!important;color:var(--th-text)!important;border-color:var(--th-accent)!important}
html[data-theme] .member-role.admin{background:color-mix(in srgb,#5fa85f 20%,var(--th-panel-alt))!important;color:var(--th-text)!important}
html[data-theme] .member-actions button{min-height:32px!important;border-radius:8px!important}
html[data-theme] .group-danger-zone{margin-top:12px!important;padding-top:12px!important;border-top:1px solid color-mix(in srgb,#d65a5a 45%,var(--th-border))!important}

/* Cache/themes/password/notifications are part of Settings and share the same cards. */
html[data-theme] .cache-settings-summary{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;margin-bottom:12px!important;
}
html[data-theme] .cache-settings-summary>div,
html[data-theme] .cache-persist-line,
html[data-theme] .password-settings,
html[data-theme] .theme-admin-note{
  padding:11px!important;border:1px solid var(--th-border)!important;border-radius:11px!important;background:var(--th-panel-alt)!important;color:var(--th-text)!important;
}
html[data-theme] .cache-settings-summary>div{display:grid!important;gap:4px!important}
html[data-theme] .cache-settings-summary span{color:var(--th-muted)!important;font-size:10px!important}
html[data-theme] .theme-grid{gap:9px!important}
html[data-theme] .theme-card{
  min-height:108px!important;padding:9px!important;border:1px solid var(--th-border)!important;
  border-radius:12px!important;background:var(--th-panel-alt)!important;color:var(--th-text)!important;outline:0!important;
}
html[data-theme] .theme-card:hover{border-color:color-mix(in srgb,var(--th-accent) 56%,var(--th-border))!important;background:var(--th-hover)!important}
html[data-theme] .theme-card.selected{border-color:var(--th-accent)!important;background:var(--th-selected)!important;box-shadow:inset 3px 0 0 var(--th-accent)!important}
html[data-theme] .theme-card small{color:var(--th-muted)!important}
html[data-theme] .theme-selected-mark{color:var(--th-accent)!important}
html[data-theme] .theme-preview{border:1px solid var(--th-border)!important;border-radius:8px!important}
html[data-theme] .theme-current-line{border-radius:10px!important}

/* Flagship wet-asphalt treatment for the new settings surfaces. */
html[data-theme="bus-past"] .modal{
  border-color:rgba(226,182,78,.25)!important;
  background:linear-gradient(180deg,#303a3f,#293338)!important;
  box-shadow:0 22px 70px rgba(4,9,12,.48),inset 0 1px rgba(255,255,255,.025)!important;
}
html[data-theme="bus-past"] .modal-titlebar{background:linear-gradient(180deg,#3b4447,#323b3e)!important}
html[data-theme="bus-past"] .account-summary,
html[data-theme="bus-past"] .public-profile-head,
html[data-theme="bus-past"] .profile-questionnaire>div,
html[data-theme="bus-past"] .account-action-tile,
html[data-theme="bus-past"] .group-overview-card,
html[data-theme="bus-past"] .group-pinned-settings,
html[data-theme="bus-past"] .group-media-box,
html[data-theme="bus-past"] .group-info-controls,
html[data-theme="bus-past"] .group-permissions-box,
html[data-theme="bus-past"] .group-invite-box,
html[data-theme="bus-past"] .group-add-box,
html[data-theme="bus-past"] .members-list,
html[data-theme="bus-past"] .theme-card{
  background:linear-gradient(145deg,#354045,#30393d)!important;border-color:#596166!important;
}
html[data-theme="bus-past"] .account-action-tile:hover,
html[data-theme="bus-past"] .contact-picker-row:hover,
html[data-theme="bus-past"] .member-row:hover{background:#414b4f!important}

/* Windows theme: only chrome changes; layout and bus identity stay exactly the same. */
html[data-theme="win98"] .modal,
html[data-theme="win98"] .account-summary,
html[data-theme="win98"] .public-profile-head,
html[data-theme="win98"] .profile-questionnaire>div,
html[data-theme="win98"] .account-action-tile,
html[data-theme="win98"] .group-overview-card,
html[data-theme="win98"] .group-pinned-settings,
html[data-theme="win98"] .group-media-box,
html[data-theme="win98"] .group-info-controls,
html[data-theme="win98"] .group-permissions-box,
html[data-theme="win98"] .group-invite-box,
html[data-theme="win98"] .group-add-box,
html[data-theme="win98"] .members-list,
html[data-theme="win98"] .theme-card,
html[data-theme="win98"] .qip-input,
html[data-theme="win98"] .profile-textarea,
html[data-theme="win98"] .group-description-input,
html[data-theme="win98"] .modal-nav-back{border-radius:0!important}
html[data-theme="win98"] .modal{border:2px outset #fff!important;box-shadow:4px 4px 0 rgba(0,0,0,.28)!important}
html[data-theme="win98"] .modal-titlebar{background:linear-gradient(90deg,#0755b5,#2588e7)!important;color:#fff!important;border-radius:0!important}

@media(max-width:820px){
  html[data-theme] .modal{width:100%!important;height:100%!important;max-height:none!important;border:0!important;border-radius:0!important;box-shadow:none!important}
  html[data-theme] .modal-titlebar{min-height:calc(54px + env(safe-area-inset-top))!important;padding-top:env(safe-area-inset-top)!important}
  html[data-theme] .modal>.padded{padding:12px 10px 18px!important}
  html[data-theme] .account-summary{grid-template-columns:70px minmax(0,1fr)!important;padding:11px!important}
  html[data-theme] .account-summary .avatar-xl,
  html[data-theme] .public-profile-head .avatar-xl,
  html[data-theme] .avatar-editor .avatar-xl{width:64px!important;height:64px!important;min-width:64px!important;border-radius:15px!important}
  html[data-theme] .account-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html[data-theme] .account-action-tile{min-height:68px!important;grid-template-columns:30px minmax(0,1fr)!important;padding:10px!important}
  html[data-theme] .profile-questionnaire{grid-template-columns:1fr!important}
  html[data-theme] .profile-wide{grid-column:auto!important}
  html[data-theme] .group-permission-grid{grid-template-columns:1fr!important}
  html[data-theme] .group-invite-options{grid-template-columns:1fr!important}
  html[data-theme] .cache-settings-summary{grid-template-columns:1fr!important}
  html[data-theme] .member-row{grid-template-columns:40px minmax(0,1fr)!important}
  html[data-theme] .member-actions{grid-column:1/-1!important;padding-left:49px!important;justify-content:flex-start!important}
  html[data-theme] .theme-grid{grid-template-columns:1fr!important}
}
@media(max-width:430px){
  html[data-theme] .account-actions{grid-template-columns:1fr!important}
  html[data-theme] .account-action-tile{min-height:58px!important}
  html[data-theme] .public-profile-head{grid-template-columns:68px minmax(0,1fr)!important;padding:10px!important}
  html[data-theme] .modal-actions{justify-content:stretch!important}
  html[data-theme] .modal-actions button{flex:1!important}
}

/* ENTITY_CONTEXT_MENU_V26 */
.entity-context-menu{
  position:fixed;z-index:16000;min-width:220px;display:grid;gap:4px;padding:6px;
  border:1px solid var(--th-border,rgba(216,172,73,.34));border-radius:11px;
  background:var(--th-surface,#2b3438);box-shadow:0 18px 48px rgba(0,0,0,.46);
}
.entity-context-menu.hidden{display:none}
.entity-context-menu button{
  min-height:40px;padding:8px 11px;border:0;border-radius:8px;background:transparent;
  color:var(--th-text,#eee5d2);text-align:left;font-size:12px;font-weight:700;cursor:pointer;
}
.entity-context-menu button:hover,.entity-context-menu button:focus-visible{background:var(--th-hover,rgba(216,172,73,.12));outline:none}
.entity-context-menu .danger-action{color:#ef9f98}
.entity-context-menu .danger-action:hover,.entity-context-menu .danger-action:focus-visible{background:rgba(177,55,49,.20)}
@media(max-width:720px){
  .entity-context-menu{min-width:min(270px,calc(100vw - 16px))}
  .entity-context-menu button{min-height:46px;font-size:13px}
}
