:root{color-scheme:dark;font:15px system-ui,-apple-system,"Segoe UI",sans-serif;background:#020b13;color:#e6f3ff;--line:#17455d;--muted:#8baaba;--cyan:#3cccff;--yellow:#ffdd51}
*{box-sizing:border-box}body{margin:0;min-height:100dvh}button,input{font:inherit}button{border:1px solid #36748d;background:#0c4364;color:#f3fcff;border-radius:11px;padding:10px 13px;cursor:pointer}button:disabled{opacity:.45}input{background:#071b2b;color:white;border:1px solid #235573;border-radius:12px;padding:12px;min-width:0;max-width:100%;width:100%;outline:none}input:focus{border-color:var(--cyan);box-shadow:0 0 0 2px #19b8ef21}
.app-background{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% -30%,#0d385a 0%,transparent 60%),#020a12}.app-shell{position:relative;min-height:100dvh;max-width:1000px;margin:auto;padding-bottom:84px}.app-head{display:flex;justify-content:space-between;align-items:center;padding:18px 18px 14px;border-bottom:1px solid #19618b;background:#061a2bbf}.brand{font-size:23px;font-weight:900;letter-spacing:.09em;color:var(--yellow);text-shadow:0 0 18px #ffbd3850}.brand span{font-size:12px;color:var(--cyan);letter-spacing:.15em}.tagline{color:var(--muted);font-size:11px;margin-top:3px}.connection-dot{color:#5d7787;font-size:16px}.connection-dot.online{color:#22d3a2}.auth-card,.panel{border:1px solid var(--line);background:#0b1d2cda;border-radius:18px;padding:17px;margin:14px 12px}.auth-card{max-width:480px;margin:60px auto}.auth-card h1{margin:0 0 10px}.auth-form label,.sip-fields label,.panel>label:not(.toggle){display:block;font-size:13px;color:#c2d7e3;margin:12px 0}.auth-form label input,.sip-fields input,.panel>label input{display:block;margin-top:6px}.subdued{color:var(--muted);font-size:12px;line-height:1.55}.buttons,.call-controls,.quick-calls{display:flex;gap:9px;flex-wrap:wrap}.buttons{margin-top:14px}.secondary{background:#172d3c}.danger{background:#752f38;border-color:#ad5261}.icon-button{background:#0d3349;border-radius:12px;padding:8px 14px;font-size:21px}.screen{display:none}.screen.active{display:block}.section-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 15px}.section-head h1{font-size:25px;margin:0;color:#edfaff}.section-head h2{margin:0;font-size:17px}.section-head p{font-size:12px;color:var(--muted);margin:2px 0 0}.chat-layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:12px;padding:0 12px}.contacts-panel,.conversation{background:#071b2b;border:1px solid var(--line);border-radius:17px;min-width:0}.contacts-panel{padding:10px}.contact-list{display:flex;flex-direction:column;gap:6px;margin-top:8px;max-height:65vh;overflow:auto}.contact-list button{background:#0f2b3e;text-align:left;border-color:transparent;white-space:normal;overflow-wrap:anywhere}.contact-list button.active{border:1px solid var(--yellow);background:#423b20}.conversation{display:flex;flex-direction:column;min-height:490px}.conversation-head{padding:12px 12px 9px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.conversation-head h2{margin:0;font-size:15px}.messages{padding:12px;display:flex;flex-direction:column;gap:9px;overflow-y:auto;height:400px;flex:1}.msg{max-width:86%;align-self:flex-start;padding:10px 13px;background:#12354c;border-radius:15px;overflow-wrap:anywhere;white-space:pre-wrap}.msg.own{align-self:flex-end;background:#565026}.msg time{display:block;margin-top:5px;font-size:10px;opacity:.65}.message-form{display:flex;gap:8px;padding:9px;border-top:1px solid var(--line)}.message-form input{flex:1}.message-form button{font-size:22px;color:var(--yellow)}.bottom-nav{position:fixed;bottom:0;left:0;right:0;max-width:1000px;margin:auto;display:grid;grid-template-columns:repeat(5,1fr);padding:6px 7px calc(6px + env(safe-area-inset-bottom));background:#03131ff3;border-top:1px solid #15547a;z-index:5;box-shadow:0 -10px 30px #0008}.bottom-nav[hidden]{display:none}.bottom-nav button{border:1px solid transparent;border-radius:10px;background:none;padding:6px 3px;color:#9bb4c1;display:flex;align-items:center;flex-direction:column;gap:3px;font-size:10px}.bottom-nav button span{font-size:22px;color:#47bfea}.bottom-nav button.active{background:#30331b;color:var(--yellow);border-color:#b99c2a}.bottom-nav button.active span{color:var(--yellow)}.panel h2{font-size:17px;color:#eaf9ff;margin:0 0 10px}.panel .section-head{padding:0 0 12px}.call-status,.status-line{color:var(--yellow);margin:8px 0}.incoming{margin:15px 0;border:1px solid var(--yellow);padding:12px;border-radius:12px}.media{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}.media video{width:100%;max-height:300px;min-height:125px;background:#000;border-radius:12px;object-fit:contain}#callHistory{color:var(--muted);font-size:13px}.profile-head{display:flex;gap:17px;align-items:center}.profile-head strong{font-size:20px}.avatar-label{display:grid;place-items:center;border-radius:50%;width:72px;height:72px;flex:none;background:#183f53;border:2px solid #e6cb46;overflow:hidden;cursor:pointer}.avatar-label img{width:100%;height:100%;object-fit:cover}.avatar-label span{font-size:32px;color:var(--yellow)}.toggle{display:block;margin:12px 0}.toggle input{width:auto}.device-row{display:flex;flex-wrap:wrap;gap:8px;padding:10px;border:1px solid var(--line);border-radius:12px;margin:8px 0;align-items:center}.device-row span{flex:1}.device-row small{color:var(--muted)}.sip-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.toast{position:fixed;right:12px;bottom:calc(85px + env(safe-area-inset-bottom));padding:10px 14px;background:#244559;border-radius:10px;border:1px solid #436d84;font-size:13px;z-index:10;max-width:90%;margin:0;display:none}.toast:not(:empty){display:block}#incoming[hidden],section[hidden],#mainPane[hidden],#authPane[hidden]{display:none!important}
@media(max-width:650px){.app-head{padding:12px 13px}.brand{font-size:20px}.tagline{font-size:10px}.chat-layout{display:block}.contacts-panel{border-radius:13px 13px 0 0;padding:8px;margin-bottom:7px}.contact-list{flex-direction:row;overflow-x:auto;max-height:100px}.contact-list button{min-width:90px;max-width:160px;flex-shrink:0;font-size:12px}.conversation{min-height:calc(100dvh - 290px)}.messages{height:calc(100dvh - 340px);min-height:195px}.conversation-head{padding:7px 11px}.sip-fields{grid-template-columns:1fr}.panel{margin:10px 9px;padding:13px}.media{grid-template-columns:1fr}.media video{max-height:180px}.auth-card{margin:30px 10px}}
@media(max-width:650px){
  #screenChats{padding-bottom:72px}
  #screenChats .message-form{position:fixed;bottom:calc(69px + env(safe-area-inset-bottom));left:0;right:0;max-width:1000px;margin:auto;z-index:4;background:#071b2b;border:1px solid #17455d;border-radius:12px 12px 0 0;box-shadow:0 -5px 20px #0006}
  #screenChats .messages{height:calc(100dvh - 350px);min-height:180px}
  #screenChats .conversation{min-height:calc(100dvh - 310px)}
}
/* Status text must never cover or intercept the send button. */
.toast{pointer-events:none}
.contact-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}.contact-actions button{padding:7px 9px;font-size:11px}.contact-actions .toggle{font-size:11px;margin:5px 0;flex-basis:100%}
.contact-list button[hidden]{display:none!important}.contact-list button.favorite{border-left:3px solid #ffdd51}

.toast{top:80px;bottom:auto;pointer-events:none;box-shadow:0 4px 20px #0007}

.peer-heading{display:flex;align-items:center;gap:8px;min-width:0}
.peer-heading img{width:32px;height:32px;object-fit:cover;border-radius:50%;border:1px solid var(--yellow)}
.contact-list button.saved-contact{border-left:2px solid #27cbab}
#avatarDelete{font-size:12px;padding:7px 11px}

/* MOLNIYA_SIPUX_CSS_V1_START */
#screenSip.sipux-on{padding:5px 10px 18px}
#screenSip.sipux-on>.sipux-legacy-head,#screenSip.sipux-on>.sipux-legacy-phone{display:none!important}
#screenSip.sipux-on>.sipux-home{display:block}
.sipux-home{max-width:660px;margin:0 auto;color:#eafbff}
.sipux-heading{display:flex;align-items:center;gap:12px;margin:12px 0 18px;padding:2px 6px}
.sipux-heading h1{font-size:23px;line-height:1.1;margin:0 0 4px}
.sipux-heading small{color:#91bbd1;font-size:12px}
.sipux-bolt{color:#ffe13e;font-size:35px;text-shadow:0 0 20px #f5cc409c}
.sipux-dot{margin-left:auto;width:12px;height:12px;border-radius:50%;background:#738d9a;box-shadow:0 0 0 4px #38516830}
.sipux-dot.connected{background:#1be8ad;box-shadow:0 0 16px #00d9a26e}
.sipux-account-tile{display:flex;align-items:center;text-align:left;width:100%;gap:13px;background:linear-gradient(135deg,#0d314d,#082031);border:1px solid #1fb7ff;border-radius:18px;padding:15px;box-shadow:inset 0 0 14px #12a6e619,0 0 15px #008dca20}
.sipux-avatar{display:grid;place-items:center;width:46px;height:46px;border:1px solid #13d1a6;border-radius:50%;background:#0b473f;font-size:24px;color:#44ffd2}
.sipux-account-text{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}
.sipux-account-text strong{font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sipux-account-text small{color:#e3b976}
.sipux-account-text small.connected{color:#26e5ab}
.sipux-chevron{font-size:32px;color:#75d8ff;line-height:1}
.sipux-quick{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin:12px 0 17px}
.sipux-neon-btn{background:linear-gradient(180deg,#0c3a56,#0a2136);border:1px solid #1b9ed6;min-height:52px;color:#8cddff;font-size:14px;font-weight:650;box-shadow:inset 0 0 14px #13b9ea12}
.sipux-dial-card{background:linear-gradient(160deg,#0a273e,#061522);border:1px solid #167eb0;border-radius:20px;padding:18px 16px 16px;box-shadow:0 8px 24px #0004}
.sipux-dial-card h2{font-size:18px;margin:0 0 15px}
#sipuxDestSlot input{font-size:22px;font-weight:650;height:58px;border-color:#257ca8;background:#051b2e}
#sipuxCallSlot{margin-top:12px}
#sipDial.sipux-call-action{width:100%;height:60px;font-size:20px;font-weight:900;color:#131800;background:linear-gradient(125deg,#ffd638,#ffeb65);border:1px solid #fff1a0;box-shadow:0 0 23px #f6cd3660}
#sipDial.sipux-call-action:disabled{opacity:.48;box-shadow:none}
.sipux-assist{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:13px;color:#9fbbcb;font-size:12px}
#sipuxCallHint{color:#fda9a9;overflow-wrap:anywhere}
.sipux-info{border:1px solid #1b4e68;border-radius:12px;padding:11px 12px;margin-top:14px;color:#7dabc6;font-size:12px;line-height:1.5}
.sipux-shade[hidden],.sipux-call-overlay[hidden],.sipux-sheet-body [hidden],#sipuxCallOverlay [hidden]{display:none!important}
.sipux-shade{position:fixed;inset:0;background:#020b14ef;z-index:110;display:flex;justify-content:center;padding:14px 8px calc(14px + env(safe-area-inset-bottom));overflow:auto}
.sipux-sheet{width:min(100%,600px);align-self:flex-start;background:#061826;border:1px solid #21aeec;border-radius:22px;padding:15px 13px 22px;box-shadow:0 0 35px #0397d739}
.sipux-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 3px 14px;border-bottom:1px solid #26536b}
.sipux-sheet-heading h2{font-size:19px;margin:0;flex:1;text-align:center}
.sipux-sheet-heading button{border:1px solid #1c6588;background:#0b2c42;color:#9deaff;border-radius:12px;min-width:42px;min-height:42px;font-size:26px;padding:2px 7px}
.sipux-sheet-body{max-height:calc(100dvh - 125px);overflow-y:auto;padding:13px 2px 10px}
.sipux-profile-list{display:flex;flex-direction:column;gap:10px}
.sipux-list-hint{font-size:12px;color:#93b8c9;margin:0 0 5px}
.sipux-profile-row{display:flex;align-items:center;text-align:left;width:100%;background:#102e43;border:1px solid #287ca6;border-radius:14px;padding:13px 12px;gap:10px}
.sipux-profile-label{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
.sipux-profile-label strong{font-size:17px}
.sipux-profile-label small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#8cb6c9}
.sipux-profile-state{font-size:12px;color:#31dfaa;white-space:nowrap}
.sipux-profile-gear{font-size:23px;color:#7ce1ff}
.sipux-empty{font-size:13px;color:#a5c1d2}
.sipux-display-label{display:block;font-size:13px;color:#cde5f2;padding:0 4px}
.sipux-display-label input{margin-top:8px}
.sipux-account-details .sipux-legacy-account{display:block!important;margin:13px 0;padding:14px 11px;border:1px solid #265a79;background:#0a2337}
.sipux-account-details .sipux-legacy-account>h2{display:none}
.sipux-account-details .sipux-legacy-account>.subdued:first-of-type{display:none}
.sipux-account-details .sipux-legacy-account #sipForgetPassword{display:none!important}
.sipux-account-details .sipux-fields{display:grid;grid-template-columns:1fr}
.sipux-account-details .sip-fields{display:block}
.sipux-form-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}
.sipux-primary{background:#074e89;border:1px solid #18b1e7;color:#f5fbff}
.sipux-danger{background:#54212a;border:1px solid #e25870;color:#ffb7c5}
.sipux-help{font-size:12px;line-height:1.5;color:#8caebf;margin:10px 5px}
.sipux-feedback{font-size:13px;line-height:1.5;color:#ffd96f;margin:9px 2px 0}
.sipux-call-overlay{position:fixed;inset:0;z-index:130;background:radial-gradient(ellipse at 50% 32%,#0d4165 0%,#041423 51%,#020911 95%);color:#effbff;overflow-y:auto;display:flex;justify-content:center}
.sipux-call-inner{width:min(100%,520px);min-height:100dvh;padding:calc(32px + env(safe-area-inset-top)) 22px calc(40px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;gap:16px}
.sipux-call-top{color:#ffe05a;letter-spacing:.13em;font-weight:900;font-size:19px;align-self:flex-start}
.sipux-call-top span{color:#50d0fc;font-size:12px}
.sipux-ring{width:min(48vw,180px);height:min(48vw,180px);margin:clamp(35px,8vh,90px) auto 12px;border:2px solid #18bbfc;border-radius:50%;box-shadow:0 0 0 18px #13a7fc14,0 0 0 35px #0983e714,0 0 50px #14a6ff70;display:grid;place-items:center;font-size:80px;color:#b6edff}
#sipuxRemoteName{font-size:clamp(24px,7vw,36px);text-align:center;overflow-wrap:anywhere}
#sipuxCallPhase{margin:0;color:#64d4ff;font-size:18px}
#sipuxCallTimer{color:#c0d9ec;font-variant-numeric:tabular-nums;font-size:20px;height:26px}
.sipux-call-buttons{display:flex;justify-content:center;gap:12px;width:100%;margin-top:35px}
.sipux-call-buttons button{flex:1;min-height:58px}
.sipux-green{background:#006b56;border:1px solid #11edba;color:#ddfff5}
.sipux-in-call-controls{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:100%;max-width:370px;margin-top:15px}
.sipux-in-call-controls button{border:1px solid #2579ab;background:#08263f;min-height:84px;font-size:27px;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:7px;border-radius:18px}
.sipux-in-call-controls button span{font-size:12px;color:#bbdef2}
.sipux-dtmf-panel{display:flex;width:100%;gap:8px}
.sipux-dtmf-panel input{flex:1;min-width:0}
.sipux-end-action{margin-top:auto;width:150px;min-height:60px;background:linear-gradient(#ff5260,#ba1c32);border:1px solid #ff7d8c;border-radius:35px;color:white;font-weight:800;font-size:17px;box-shadow:0 0 25px #ff183f40}
#bottomNav button[data-screen="Sip"].active{border-color:#f7d539;background:linear-gradient(#473e17,#252611);box-shadow:0 0 17px #d6b42855}
#bottomNav button[data-screen="Sip"].active span{color:#fff16b}
@media(max-width:400px){.sipux-quick{gap:8px}.sipux-neon-btn{font-size:12px;padding:8px}.sipux-sheet{padding:11px 8px}.sipux-form-actions button{padding:9px 5px;font-size:12px}.sipux-call-inner{gap:13px}}
/* MOLNIYA_SIPUX_CSS_V1_END */

/* MOLNIYA_SIP_AUTOCONNECT_CSS_V1 */
.sipauto-toggle{display:flex;align-items:center;gap:10px;padding:11px 14px;
  margin:10px 0 4px;border:1px solid rgba(36,185,255,.40);border-radius:12px;
  background:linear-gradient(90deg,rgba(4,32,51,.94),rgba(8,43,64,.8));
  color:#caeaff;font-size:.88rem;line-height:1.35;cursor:pointer}
.sipauto-toggle input{width:18px;height:18px;flex-shrink:0;accent-color:#ffda39}
.sipauto-hint{font-size:.75rem;line-height:1.35;color:#8ab4cc;margin:0 2px 8px}
/* MOLNIYA_SIP_AUTOCONNECT_CSS_END */


/* MOLNIYA_CHAT_NEON_V1_BEGIN - visual only, scoped to chat UI */
#screenChats{
  --mnc-panel:#071b2b;--mnc-cyan:#3dd8ff;--mnc-yellow:#ffdc53;
  --mnc-divider:#1a4861;
  min-width:0;
}
#screenChats>.section-head{padding:19px 18px 16px;position:relative;}
#screenChats>.section-head h1{font-size:25px;font-weight:850;letter-spacing:-.025em;color:#f1faff}
#screenChats>.section-head p{font-size:12px;color:#8eafc2;margin-top:3px}
#screenChats #refreshUsers{width:43px;height:43px;display:grid;place-items:center;border-radius:13px;color:#ffdc53;border:1px solid #2b7d9e;background:#0b2a40;box-shadow:0 0 12px #12a4e522}
#screenChats .chat-layout{gap:14px;align-items:stretch}
#screenChats .contacts-panel,#screenChats .conversation{background:linear-gradient(160deg,rgba(12,39,59,.97),rgba(3,17,30,.98));border:1px solid #19546c;border-radius:19px;box-shadow:0 10px 30px #0003;overflow:hidden}
#screenChats .contacts-panel{padding:12px}
#screenChats #contactSearch{height:46px;border-radius:14px;padding:12px 14px;border-color:#28647a;background:#071725;font-size:14px}
#screenChats #contactSearch:focus{border-color:#5fdbff;box-shadow:0 0 0 3px #16a6e81f}
#screenChats .contact-list{gap:6px;max-height:62vh;margin-top:12px}
#screenChats .contact-list button{min-height:61px;max-width:100%;width:100%;display:flex;gap:11px;align-items:center;text-align:left;padding:8px 10px;border:1px solid transparent;border-radius:14px;background:#102d40;color:#eef9ff;white-space:normal;transition:background .15s,border-color .15s}
#screenChats .contact-list button:hover,#screenChats .contact-list button:focus-visible{background:#163d55;border-color:#4086a6}
#screenChats .contact-list button.active{background:linear-gradient(110deg,#1e4150,#293724);border-color:#bda846;box-shadow:inset 3px 0 #f5da5a}
#screenChats .contact-list button.favorite{border-left:3px solid #ffdc53}
#screenChats .contact-list button.saved-contact{border-left:3px solid #45d6bd}
#screenChats .contact-list .mnc-contact-avatar{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:14px;background:linear-gradient(135deg,#104d72,#173149);border:1px solid #367b9b;font-size:16px;font-weight:800;color:#f5dc69;box-shadow:0 2px 12px #07121caa}
#screenChats .contact-list .mnc-contact-name{display:block;flex:1;overflow:hidden;text-overflow:ellipsis;font-size:13px;font-weight:680;letter-spacing:.01em}
#screenChats .contact-list .mnc-contact-presence{width:9px;height:9px;flex:none;border-radius:50%;border:1px solid #94b0bb;background:#546e7c}
#screenChats .contact-list .mnc-contact-presence.online{background:#39daa2;border-color:#39daa2;box-shadow:0 0 10px #39daa280}
#screenChats .mnc-contacts-details{margin-top:12px;border:1px solid #234d60;border-radius:13px;padding:0 10px 8px;background:#061e2c}
#screenChats .mnc-contacts-details summary{cursor:pointer;list-style:none;display:flex;gap:8px;justify-content:space-between;padding:11px 2px;color:#bed9e5;font-size:12px;font-weight:700}
#screenChats .mnc-contacts-details summary::-webkit-details-marker{display:none}
#screenChats .mnc-contacts-details summary:after{content:'⌄';font-size:16px;color:#4cbde1}
#screenChats .mnc-contacts-details[open] summary:after{content:'⌃'}
#screenChats .contact-actions{margin:0;padding-top:7px;border-top:1px solid #21465b;gap:7px}
#screenChats .contact-actions button{border-radius:10px;padding:8px 9px}
#screenChats .conversation{min-height:510px}
#screenChats .conversation-head{padding:13px 14px;min-height:66px;gap:12px;background:linear-gradient(90deg,#0a2b43,#0b2337);border-color:#25556f}
#screenChats .conversation-head .peer-heading{display:flex;min-width:0;flex:1;gap:10px}
#screenChats .conversation-head h2{color:#f2fbff;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#screenChats .conversation-head #peerAvatar{width:39px;height:39px;border:2px solid #edcf4b;flex:none;object-fit:cover}
#screenChats .quick-calls{gap:7px;flex:none}
#screenChats .quick-calls button{border:1px solid #356f88;background:#103950;border-radius:13px;color:#f5d853;width:42px;height:42px;display:grid;place-items:center;padding:0;font-size:21px}
#screenChats .quick-calls button:disabled{opacity:.4}
#screenChats .mnc-back{display:none;border:1px solid #356f88;border-radius:11px;background:#0f3045;color:#e2f6ff;width:39px;height:39px;flex:none;align-items:center;justify-content:center;font-size:23px;padding:0}
#screenChats .mnc-empty{margin:auto;padding:22px;text-align:center;max-width:310px;color:#98b5c5;font-size:13px;line-height:1.55}
#screenChats .mnc-empty .mnc-icon{display:block;font-size:35px;color:#ffdc53;margin-bottom:8px;text-shadow:0 0 24px #ffcb4a44}
#screenChats .messages{height:420px;min-height:230px;gap:11px;padding:16px 15px 20px;background:radial-gradient(ellipse at 90% 12%,#17486c33 0,transparent 55%),radial-gradient(ellipse at 10% 85%,#18607e22 0,transparent 50%),#061724;scroll-behavior:smooth}
#screenChats .msg{position:relative;padding:11px 13px 9px;max-width:82%;border-radius:17px 17px 17px 5px;background:#143b53;border:1px solid #2a5c79;color:#f2fbff;font-size:14px;line-height:1.48;box-shadow:0 3px 12px #0002;white-space:pre-wrap;overflow-wrap:anywhere}
#screenChats .msg.own{border-radius:17px 17px 5px 17px;background:linear-gradient(140deg,#3d4726,#454521);border-color:#77733a;color:#fffbe4}
#screenChats .msg time{font-size:10px;font-variant-numeric:tabular-nums;color:#bdd6e0;opacity:.77;text-align:right;margin-top:7px}
#screenChats .msg.own time{color:#f3e0a2}
#screenChats .message-form{border-top:1px solid #27546c;background:#0b283b;padding:10px 12px;gap:9px;align-items:center}
#screenChats #messageText{background:#061928;border:1px solid #2e627e;border-radius:16px;min-height:45px;padding:10px 14px;font-size:14px}
#screenChats .message-form button{width:46px;height:46px;flex:none;display:grid;place-items:center;border-radius:15px;background:linear-gradient(135deg,#ffd85c,#d7a92e);border:1px solid #ffe28a;color:#0b2738;font-size:21px;box-shadow:0 4px 16px #f3cb5333}
#screenChats .message-form button:active{transform:scale(.97)}
@media(max-width:650px){
  #screenChats>.section-head{padding:14px 15px 10px}
  #screenChats>.section-head h1{font-size:23px}
  #screenChats .chat-layout{display:block;padding:0 9px}
  #screenChats .contacts-panel{display:block;margin:0;border-radius:17px;padding:12px;min-height:calc(100dvh - 220px)}
  #screenChats .contact-list{max-height:calc(100dvh - 330px);overflow-y:auto;overflow-x:hidden;flex-direction:column}
  #screenChats .contact-list button{min-width:0;max-width:none;flex-shrink:0;font-size:14px}
  #screenChats .conversation{display:none;min-height:calc(100dvh - 164px);border-radius:17px;margin:0}
  #screenChats.mnc-chat-open>.section-head{display:none}
  #screenChats.mnc-chat-open .contacts-panel{display:none}
  #screenChats.mnc-chat-open .conversation{display:flex}
  #screenChats .mnc-back{display:flex}
  #screenChats .conversation-head{min-height:62px;padding:9px 10px}
  #screenChats .conversation-head h2{font-size:15px}
  #screenChats .messages{height:auto!important;flex:1;min-height:200px;padding:12px 12px 18px}
  #screenChats .msg{max-width:88%;font-size:14px}
  #screenChats .message-form{position:sticky!important;bottom:calc(62px + env(safe-area-inset-bottom))!important;left:auto!important;right:auto!important;box-shadow:none!important;border-radius:0!important;z-index:2!important;margin-top:auto}
  #screenChats .message-form button{width:44px;height:44px}
  #screenChats .conversation{height:calc(100dvh - 166px - env(safe-area-inset-bottom));min-height:365px}
}
@media(prefers-reduced-motion:reduce){#screenChats .messages{scroll-behavior:auto}#screenChats .contact-list button{transition:none}}
/* MOLNIYA_CHAT_NEON_V1_END */



/* MOLNIYA_MESSAGE_SENDER_V1 - safe new-message banner and unread marker */
.mnc-incoming-notice{position:fixed;z-index:4500;top:calc(12px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(95vw,420px);display:flex;align-items:center;gap:12px;padding:13px 14px;border-radius:17px;border:1px solid #56cff7;background:#09283cef;color:#f3fbff;box-shadow:0 8px 30px #0008,0 0 18px #17cafa55;backdrop-filter:blur(8px)}
.mnc-incoming-notice[hidden]{display:none!important}
.mnc-notice-heading{flex:1;min-width:0;font-weight:750;font-size:14px;overflow-wrap:anywhere}
.mnc-notice-open{flex:none;border-radius:11px;border:1px solid #f6d858;background:#f3d054;color:#102538;padding:9px 12px;font-weight:800}
#screenChats .contact-list button.mnc-unread{border-color:#efcf50;box-shadow:inset 3px 0 #efcf50,0 0 10px #e4c84a22}
#screenChats .mnc-contact-name{position:relative}
#screenChats button.mnc-unread .mnc-contact-name::after{content:' ●';color:#ffd454}

/* MOLNIYA_CHAT_RECEIPTS_V1: real acknowledgement icons, stable mobile conversation */
#screenChats .msg.own .mnc-delivery{display:inline-flex;gap:1px;align-items:center;vertical-align:middle;margin-left:6px;white-space:nowrap;line-height:1;user-select:none;color:#f4d359;opacity:.9}
#screenChats .msg.own .mnc-delivery::before,#screenChats .msg.own .mnc-delivery::after{content:'';display:block;flex:none;width:9px;height:13px;background:currentColor;clip-path:polygon(52% 0%,15% 53%,45% 53%,30% 100%,90% 38%,59% 38%,77% 0%)}
#screenChats .msg.own .mnc-delivery[data-state=sent]::after{display:none}
#screenChats .msg.own .mnc-delivery[data-state="delivered"]{color:#58c8ff;opacity:1;text-shadow:0 0 8px #2b9fff33}
#screenChats .msg.own .mnc-delivery[data-state="read"]{color:#34e6a2;opacity:1;text-shadow:0 0 9px #34e6a244}
#screenChats .msg.own time{display:inline-block;vertical-align:baseline;margin-top:8px}
#screenChats .msg{overflow-anchor:none}
#screenChats #messages{overflow-anchor:none;scroll-behavior:auto!important;overscroll-behavior:contain}
@media(max-width:650px){
  html.mnc-stable-chat,body.mnc-stable-chat{overflow:hidden!important;overscroll-behavior:none!important}
  #screenChats.mnc-chat-open .chat-layout{
    position:fixed!important;
    z-index:3!important;
    top:calc(var(--mnc-top,62px) + var(--mnc-vvoffset,0px))!important;
    left:0!important;right:0!important;
    width:100%!important;
    max-width:1000px!important;
    margin:0 auto!important;
    padding:0 8px!important;
    height:calc(var(--mnc-visible-h,100dvh) - var(--mnc-top,62px) - var(--mnc-nav,68px))!important;
    overflow:hidden!important;
  }
  #screenChats.mnc-chat-open .conversation{
    min-height:0!important;
    height:100%!important;
    max-height:100%!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
  }
  #screenChats.mnc-chat-open #messages{height:auto!important;min-height:0!important;flex:1 1 auto!important;overflow-y:auto!important;overscroll-behavior:contain}
  #screenChats.mnc-chat-open .message-form{
    position:relative!important;bottom:auto!important;left:auto!important;right:auto!important;
    margin:0!important;flex:none!important;box-shadow:none!important
  }
}
/* MOLNIYA_CHAT_RECEIPTS_V1_END */


/* MOLNIYA_CHAT_PLUS_V1: compact event badges + composer + stable contact panel. */
#screenChats .mnc-event-badges{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:3px;max-width:125px;flex:none}
#screenChats .mnc-event-badge{display:inline-flex;padding:3px 5px;border-radius:7px;font-size:12px;font-weight:800;line-height:1.2;border:1px solid #437d92;background:#12334b;white-space:nowrap}
#screenChats .mnc-event-unread{color:#ffe069;border-color:#a98b31;background:#403619}
#screenChats .mnc-event-missedAudio,#screenChats .mnc-event-missedVideo{color:#ff9fa7;border-color:#aa5661;background:#381e2a}
#screenChats .mnc-attach-toggle{display:grid!important;place-items:center;flex:0 0 43px!important;width:43px!important;height:43px!important;border:1px solid #348bb1!important;background:#0f3c57!important;color:#ffd851!important;border-radius:13px!important;font-size:29px!important;line-height:1!important;box-shadow:none!important}
#screenChats .mnc-attach-tray{display:flex;gap:8px;padding:8px 11px;background:#09283c;border-top:1px solid #27617a}
#screenChats .mnc-attach-tray[hidden],#screenChats .mnc-file-preview[hidden],.mnc-image-overlay[hidden]{display:none!important}
#screenChats .mnc-attach-choice{flex:1;border:1px solid #2e7b9c;background:#0d3952;border-radius:11px;font-weight:700;padding:10px}
#screenChats .mnc-file-preview{display:flex;gap:10px;padding:9px 10px;align-items:center;background:#102d40;border-top:1px solid #2a677b}
#screenChats .mnc-file-preview img{height:44px;width:44px;object-fit:cover;border-radius:8px}
#screenChats .mnc-file-preview-name{flex:1;min-width:0;overflow-wrap:anywhere;font-size:12px}
#screenChats .mnc-file-remove{flex:0 0 35px;width:35px;height:35px;background:#582d39;color:#fff;display:grid;place-items:center;padding:0}
#screenChats .mnc-attachment{display:flex;flex-direction:column;gap:6px;padding:5px 0;min-width:0;white-space:normal}
#screenChats .mnc-chat-image{width:min(240px,100%);max-height:280px;object-fit:cover;border-radius:10px;border:1px solid #367690;cursor:zoom-in}
#screenChats .mnc-attachment audio{max-width:260px;width:100%}
#screenChats .mnc-attachment a{font-size:12px;color:#73d9ff;overflow-wrap:anywhere}
.mnc-image-overlay{position:fixed;inset:0;z-index:9000;background:#030a0bef;display:flex;justify-content:center;align-items:center;padding:52px 14px 20px}
.mnc-image-overlay img{max-width:100%;max-height:94%;object-fit:contain}
.mnc-image-overlay .mnc-image-close{position:absolute;top:22px;right:17px;font-size:28px;color:white;background:#314658;z-index:2}
@media(max-width:650px){
  #screenChats.active:not(.mnc-chat-open){position:fixed!important;z-index:2;top:var(--mnc-list-top,70px)!important;bottom:var(--mnc-list-bottom,75px)!important;left:0;right:0;display:flex;flex-direction:column;padding:0!important;overflow:hidden!important;overscroll-behavior:none}
  #screenChats.active:not(.mnc-chat-open)>.section-head{flex:0 0 auto!important}
  #screenChats.active:not(.mnc-chat-open) .chat-layout{display:flex!important;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden;padding:0 9px}
  #screenChats.active:not(.mnc-chat-open) .contacts-panel{display:flex!important;flex-direction:column;min-height:0!important;height:100%;flex:1 1 auto;overflow:hidden!important;margin:0!important}
  #screenChats.active:not(.mnc-chat-open) .contact-list{display:flex!important;flex-direction:column!important;min-height:0!important;max-height:none!important;flex:1 1 auto;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain}
  #screenChats.active:not(.mnc-chat-open) .mnc-contacts-details{flex:0 0 auto}
  #screenChats .contact-list button{min-height:61px}
  #screenChats .mnc-event-badges{max-width:95px}
  #screenChats.mnc-chat-open .mnc-attach-tray,#screenChats.mnc-chat-open .mnc-file-preview{flex:0 0 auto}
  #screenChats.mnc-chat-open .message-form{flex:0 0 auto!important}
}
/* MOLNIYA_CHAT_PLUS_V1_END */


/* MOLNIYA_CHAT_RICH_1_0: compact, dark, neonglow message actions */
#screenChats .mnr-composer-button{flex:0 0 38px!important;width:38px;height:41px;min-width:38px;padding:0!important;display:grid;place-items:center;border-radius:11px;background:#10384e;border:1px solid #2783a9;color:#fddd66;font-size:21px;box-shadow:none}
#screenChats .mnr-composer-button:focus-visible,#screenChats .mnr-action:focus-visible{outline:2px solid #ffe472;outline-offset:2px}
#screenChats .message-form{gap:5px!important}
#screenChats .message-form #messageText{min-width:0!important;flex:1 1 70px!important}
#screenChats .mnr-msg-forward{display:inline-block;font-size:11px;font-weight:700;color:#a6d9f4;margin-bottom:5px;border-left:2px solid #41b1e8;padding-left:6px}
#screenChats .mnr-sticker-message{font-size:56px!important;line-height:1.25;background:linear-gradient(135deg,#0c3b5e,#2e3c74);border:1px solid #3fa2d9;border-radius:21px;display:inline-flex;min-height:76px;align-items:center;justify-content:center;padding:6px 15px;text-shadow:0 4px 15px #001}
#screenChats .mnr-message-action{align-self:flex-end!important;font-size:12px!important;background:transparent!important;color:#92d6f5!important;border:0!important;padding:3px 7px!important;box-shadow:none!important;min-width:30px}
.mnr-overlay{position:fixed;z-index:9500;inset:0;background:#001018e8;display:flex;justify-content:center;align-items:center;padding:14px}
.mnr-overlay[hidden]{display:none!important}
.mnr-dialog{width:min(420px,100%);max-height:85dvh;overflow:auto;overscroll-behavior:contain;border-radius:18px;padding:16px;background:#061d31;border:1px solid #2f9dc3;box-shadow:0 18px 60px #000b;color:#e7f7ff}
.mnr-dialog h3{margin:0 0 12px;font-size:18px;color:#ffe477}
.mnr-action,.mnr-recipient{display:flex;align-items:center;gap:9px;border:1px solid #317d9b;background:#09324a;color:#eaf8ff;border-radius:11px;padding:12px;width:100%;text-align:left;margin:7px 0;cursor:pointer}
.mnr-action.primary{background:#124b43;color:#80ffd4;border-color:#22a882;font-weight:700}
.mnr-action.danger{background:#3b2335;color:#ffb7bc;border-color:#99495f}
.mnr-recipient input{width:20px;height:20px;flex:none;accent-color:#f5d15f}
.mnr-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}
.mnr-emoji,.mnr-sticker{background:#103850;color:#fff;border:1px solid #376b8a;border-radius:12px;min-height:47px;font-size:24px;padding:4px;text-align:center}
.mnr-sticker{font-size:34px;min-height:64px}
.mnr-preview{overflow-wrap:anywhere;border-radius:10px;border:1px solid #286c8b;padding:10px;margin:10px 0;color:#bce8fb;max-height:110px;overflow:auto}
.mnr-contact-avatar-img{width:40px;height:40px;object-fit:cover;border-radius:12px;display:block}
@media(max-width:420px){#screenChats .mnr-composer-button{flex-basis:34px!important;width:34px;height:39px;font-size:19px}#screenChats .message-form{gap:3px!important}#screenChats .mnc-attach-toggle{flex-basis:35px!important;width:35px!important;height:39px!important}}
/* END MOLNIYA_CHAT_RICH_1_0 */


/* MOLNIYA_CHAT_CLEANUP_V1: compact history/retention controls */
#screenChats .mcc-menu-button{width:38px;height:38px;min-width:38px;flex:0 0 38px;padding:0;border-radius:12px;border:1px solid #418ba7;background:#12364f;color:#ffe17b;font-size:25px;font-weight:700;line-height:1}
#screenChats .mcc-menu-button[hidden],.mcc-modal[hidden]{display:none!important}
.mcc-modal{position:fixed;inset:0;background:rgba(2,10,22,.88);z-index:9800;display:flex;align-items:center;justify-content:center;padding:16px}
.mcc-dialog{background:#0b263c;border:1px solid #449dbc;box-shadow:0 20px 70px #0009,0 0 20px #1e7c9d45;border-radius:18px;padding:18px;width:min(410px,100%);max-height:85vh;overflow-y:auto;color:#e5f5ff;display:flex;flex-direction:column;gap:12px}
.mcc-dialog h3{font-size:20px;color:#f0db82;margin:0}
.mcc-dialog .mcc-description{font-size:13px;line-height:1.5;color:#b2d4e9;margin:0}
.mcc-dialog .mcc-note{font-size:12px;line-height:1.5;color:#f4d49a;margin:0}
.mcc-dialog .mcc-setting{display:flex;flex-direction:column;gap:7px;font-size:14px;color:#eff6ff}
.mcc-dialog .mcc-select{background:#0c354c;color:#f7fbff;border:1px solid #4c9eb7;border-radius:10px;padding:12px;font:inherit;width:100%}
.mcc-dialog .mcc-actions{display:flex;gap:10px;flex-wrap:wrap}
.mcc-dialog .mcc-stacked{display:flex;flex-direction:column;align-items:stretch}
.mcc-dialog button{border-radius:11px;padding:11px 13px;font-size:14px;font-weight:700;cursor:pointer;min-height:40px}
.mcc-dialog .mcc-primary{background:#1684b2;border:1px solid #5fc8fb;color:white}
.mcc-dialog .mcc-secondary{background:#123e56;border:1px solid #4386a8;color:#edf8ff}
.mcc-dialog .mcc-danger{background:#4f1e33;border:1px solid #ca566f;color:#ffe1e5}

