:root{--bg:#10141c;--panel:#191f2a;--panel2:#202936;--text:#edf1f7;--muted:#99a6ba;--line:#2c3543;--accent:#78a5ff;--accent2:#3b6de0;--green:#70d7ae;--red:#f0959c;color-scheme:dark}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{opacity:.45;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}a{color:var(--accent);text-decoration:none}.shell{max-width:1040px;margin:auto;padding:0 24px calc(100px + env(safe-area-inset-bottom))}.top{height:64px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);margin-bottom:10px}.brand{display:flex;gap:12px;align-items:center;font-size:21px;font-weight:750;letter-spacing:-.6px;color:var(--text)}.logo{height:43px;width:43px;display:grid;place-items:center;border-radius:14px;background:var(--accent);color:#111c36;font-size:27px;font-weight:900}.brand small{display:block;font-size:9px;letter-spacing:2.3px;color:var(--muted);font-weight:600;margin-top:-3px}.lang-chip,.icon-btn{border:1px solid var(--line);border-radius:12px;background:var(--panel);min-width:44px;height:42px;font-size:20px;display:grid;place-items:center}.view{display:none}.view.active{display:block}h1{font-size:32px;letter-spacing:-1.1px;line-height:1.16;margin:8px 0 15px}h2{font-size:23px;letter-spacing:-.6px;margin:0 0 8px}h3{font-size:16px;margin:0 0 14px}.eyebrow{color:var(--accent);font-size:10px;letter-spacing:2px;font-weight:750}.muted{color:var(--muted)}.caption{font-size:12px;line-height:1.65}.section-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-top:0}#view-chats .section-heading{margin-top:-4px}#view-chats .eyebrow{margin:0}#view-chats h1{margin:2px 0 8px}.section-heading h1{margin-bottom:0}.notice{padding:13px 16px;border:1px solid #8b565a;border-radius:13px;background:#302226;color:#ffd5d5;margin:0 0 20px;font-size:13px;white-space:pre-wrap}.card{background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:24px;margin-bottom:16px}.hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:28px;background:linear-gradient(125deg,#1e2c46,#192333);border-color:#344461}.hero .profile-initial{font-size:38px;width:74px;height:74px;border-radius:24px;color:var(--accent);background:#2b3c5c;display:grid;place-items:center;flex-shrink:0}.badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:8px;background:#1a3932;color:var(--green);font-size:11px;font-weight:650;margin:12px 0 0}.badge.off{color:var(--muted);background:var(--panel2)}.badge i{width:5px;height:5px;border-radius:50%;background:currentColor}.quick-open{display:flex;justify-content:space-between;width:100%;background:var(--accent);color:#112449;border:0;padding:17px 20px;font-weight:700;border-radius:14px;margin-bottom:26px}.home-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.home-grid .card{margin:0}.note{padding:12px 0;border-top:1px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere}.note:first-of-type{border:0}.note small{display:block;color:var(--accent);font-size:11px;margin-bottom:4px}.bottom-nav{position:fixed;bottom:18px;bottom:calc(18px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(490px,calc(100% - 32px));background:#202734f5;backdrop-filter:blur(16px);display:flex;padding:7px;border:1px solid #394352;border-radius:20px;z-index:10;box-shadow:0 10px 40px #0005}.bottom-nav button{background:none;border:0;flex:1;padding:6px 2px;color:var(--muted);border-radius:13px;display:flex;flex-direction:column;align-items:center;gap:2px}.bottom-nav button.selected{background:#314462;color:#b7ceff}.bottom-nav button span{display:grid;place-items:center;height:24px}
.bottom-nav button svg{width:23px;height:23px}.bottom-nav button b{font-size:10px;font-weight:650}.chat-layout{display:grid;grid-template-columns:310px minmax(0,1fr);background:var(--panel);border:1px solid var(--line);border-radius:22px;overflow:hidden;height:clamp(520px,calc(100dvh - 240px),1200px)}.chat-sidebar{border-right:1px solid var(--line);min-width:0;min-height:0;display:flex;flex-direction:column}.search{display:flex;align-items:center;gap:10px;background:var(--panel2);border-radius:12px;margin:15px;padding:8px 12px}.search span{display:grid;place-items:center;color:var(--muted)}
.search span svg{width:18px;height:18px}.search input{background:none;border:0;color:var(--text);min-width:0;width:100%;outline:0;font-size:13px}#chat-list{flex:1;min-height:0;overflow:auto}.chat-item{display:flex;width:100%;text-align:left;align-items:center;gap:12px;padding:15px;border:0;border-bottom:1px solid var(--line);background:none}.chat-item:hover,.chat-item.selected{background:var(--panel2)}.avatar{width:45px;height:45px;border-radius:15px;background:#354762;color:#bbd2f2;display:grid;place-items:center;flex-shrink:0;overflow:hidden;position:relative;font-weight:750;font-size:18px}.avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.chat-info{min-width:0;flex:1}.chat-info b,.chat-info small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-info b{font-size:14px}.chat-info .username{font-size:11px;color:var(--accent)}.chat-info time{font-size:10px;color:var(--muted)}.chat-count{font-size:10px;padding:2px 6px;color:var(--muted);background:var(--panel2);border-radius:6px}.conversation{min-width:0;min-height:0;display:flex;flex-direction:column}.conversation-header{padding:15px 18px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px}.conversation-header strong{flex:1;overflow:hidden;text-overflow:ellipsis}.conversation-header button{border:0;background:var(--panel2);padding:7px 11px;border-radius:10px;display:grid;place-items:center}.message-list{flex:1;min-height:0;height:auto;max-height:none;padding:20px;overflow:auto;display:flex;flex-direction:column;gap:12px}.bubble{align-self:flex-start;background:var(--panel2);border:1px solid #344052;padding:13px 15px;border-radius:16px 16px 16px 4px;max-width:92%;min-width:110px;overflow-wrap:anywhere}.bubble.mine{align-self:flex-end;background:#233653;border-color:#344b70;border-radius:16px 16px 4px 16px}.sender{font-size:11px;color:var(--accent);font-weight:700;margin-bottom:5px}.message-time{display:block;text-align:right;font-size:10px;color:var(--muted);margin-top:8px}.deleted-mark{color:var(--red)}.message-body p{margin:.4em 0}.message-body p:first-child{margin-top:0}.message-body img,.media-block img{max-width:min(100%,380px);max-height:420px;height:auto;border-radius:10px;display:block}
.media-sticker img{max-width:min(100%,160px);max-height:160px;background:none;border-radius:0}.message-body video,.media-block video{width:auto;height:auto;max-width:100%;max-height:380px;border-radius:10px;background:#000}
.media-animation video{max-width:min(100%,300px);max-height:300px}.message-body audio,.media-block audio{width:100%;max-width:360px;margin:8px 0}.media-block{margin-top:8px}.video-note{aspect-ratio:1;border-radius:50%!important;max-width:250px!important;object-fit:contain}.media-title{font-size:12px;font-weight:650;margin-bottom:5px}.media-error{color:var(--muted);font-size:12px;padding:10px;background:#ffffff05;border-radius:8px}.bubble pre{overflow:auto;white-space:pre-wrap;background:#0003;border-radius:8px;padding:10px;font-size:12px}.bubble blockquote{margin:8px 0;padding:4px 10px;border-left:3px solid var(--accent);background:#ffffff06}.bubble details{background:#ffffff07;border-radius:8px;padding:8px}.spoiler{background:#566170;color:transparent;cursor:pointer;border-radius:3px}.spoiler:hover,.spoiler:focus{color:inherit;background:#56617055}.table-scroll{overflow:auto;max-width:100%}.bubble table{border-collapse:collapse;font-size:12px;min-width:180px}.bubble td,.bubble th{border:1px solid #526078;padding:7px 10px;vertical-align:top}.bubble th{background:#ffffff12}.bubble h1,.bubble h2,.bubble h3{font-size:19px;letter-spacing:0;margin:8px 0}.bubble ul{padding-left:20px}.rich-buttons{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.rich-button{padding:6px 10px;background:#35507d;border-radius:8px}.poll-option{position:relative;padding:8px;border:1px solid var(--line);border-radius:8px;font-size:12px;margin:5px 0;overflow:hidden}.poll-option .fill{position:absolute;inset:0 auto 0 0;background:#78a5ff18;z-index:0}.poll-option span{position:relative}.poll-option b{float:right;font-size:10px}.field{display:block;margin:24px 0}.field span{display:block;font-size:12px;color:var(--muted);margin-bottom:7px}.field select{padding:14px;width:100%;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:12px}.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.stat{padding:23px 18px;border:1px solid var(--line);background:var(--panel);border-radius:17px}.stat .value{font-size:36px;font-weight:750;letter-spacing:-1px;line-height:1.3}.stat small{color:var(--muted);font-size:12px}.stat:first-child .value{color:var(--accent)}.stat:nth-child(2) .value{color:var(--green)}.split-bar{height:10px;background:var(--panel2);display:flex;overflow:hidden;border-radius:10px;margin:26px 0 10px}.split-bar .sent{background:var(--accent)}.split-bar .received{background:var(--green)}.legend{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}.period{margin-top:24px;padding:20px 0;border-top:1px solid var(--line);color:var(--muted);font-size:12px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 0;border-top:1px solid var(--line)}.setting-row small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.setting-row b{font-size:14px}.setting-row input{appearance:none;flex-shrink:0;width:44px;height:26px;background:#414a58;border-radius:20px;position:relative;cursor:pointer;transition:.2s}.setting-row input:before{content:"";position:absolute;left:4px;top:4px;width:18px;height:18px;background:white;border-radius:50%;transition:.2s}.setting-row input:checked{background:var(--accent2)}.setting-row input:checked:before{transform:translateX(18px)}.language-options{display:flex;gap:10px}.language-options button{flex:1;background:var(--panel2);border:1px solid var(--line);padding:12px;border-radius:12px}.language-options button.selected{border-color:var(--accent);color:var(--accent);background:#223552}.privacy{display:flex;gap:12px;align-items:flex-start;padding:6px 18px;color:var(--muted);font-size:12px}.privacy span{font-size:25px}.empty{padding:70px 24px;text-align:center;color:var(--muted);font-size:13px}.empty-icon{width:58px;height:58px;background:var(--panel2);border-radius:19px;display:grid;place-items:center;font-size:28px;color:var(--accent);margin:0 auto 16px}.empty h3{color:var(--text);margin-bottom:4px}.empty p{max-width:250px;margin:0 auto}.subtle{background:none;border:0;color:var(--accent);padding:14px;font-size:12px;align-self:center}.mobile-back{display:none}.skeleton{display:grid;gap:15px}.skeleton span{height:120px;background:linear-gradient(100deg,var(--panel),var(--panel2),var(--panel));border-radius:18px;animation:pulse 1.6s infinite}@keyframes pulse{50%{opacity:.55}}.edit-badge{background:none;border:0;padding:0;font-family:inherit;font-size:10px;color:var(--accent);border-bottom:1px dashed currentColor}.edit-badge:disabled{opacity:1}.modal{position:fixed;inset:0;z-index:40;background:#070a10db;backdrop-filter:blur(6px);display:flex;align-items:flex-end;justify-content:center}.modal[hidden]{display:none}.modal-card{background:var(--panel);border:1px solid var(--line);border-radius:20px 20px 0 0;width:min(680px,100%);max-height:86dvh;display:flex;flex-direction:column}.modal-head{display:flex;align-items:center;gap:12px;padding:15px 18px;border-bottom:1px solid var(--line)}.modal-head strong{flex:1;font-size:15px}.modal-head button{background:var(--panel2);border:0;color:var(--text);border-radius:10px;padding:7px 11px;display:grid;place-items:center}.modal-body{overflow:auto;padding:16px 18px calc(26px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px}.version{background:var(--panel2);border:1px solid #344052;border-radius:14px;padding:12px 14px;overflow-wrap:anywhere}.version-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:6px}.icon-btn svg{width:19px;height:19px}.conversation-header button svg{width:19px;height:19px}.modal-head button svg{width:16px;height:16px}.media-block a{display:inline-flex;align-items:center;gap:6px}.media-block a svg{width:16px;height:16px}
.reply-quote{display:block;width:100%;text-align:left;background:#ffffff0a;border:0;border-left:3px solid var(--accent);border-radius:0 8px 8px 0;padding:6px 10px;margin-bottom:7px;overflow:hidden}
.reply-quote b{display:block;font-size:11px;color:var(--accent)}
.reply-quote span{display:block;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bubble.flash{animation:flash 1.4s ease}
@keyframes flash{0%,100%{box-shadow:0 0 0 0 transparent}25%{box-shadow:0 0 0 2px var(--accent)}}
.version-head b{font-size:12px;color:var(--accent)}.version-head time{font-size:10px;color:var(--muted)}.version-tag{font-size:9px;color:var(--muted);border:1px solid var(--line);border-radius:6px;padding:1px 5px;margin-left:6px;font-weight:600}.version .message-time{display:none}.version.current{border-color:#3d5a86}
@media(max-width:700px){.shell{padding:0 16px 110px}.top{height:56px;margin-bottom:6px}#view-chats .section-heading{margin-top:-2px}h1{font-size:28px}.home-grid{grid-template-columns:1fr}.hero{padding:23px}.chat-layout{display:block;height:clamp(420px,calc(100dvh - 230px),1000px)}.chat-sidebar{border-right:0;height:100%;min-height:0}#chat-list{max-height:none}.conversation{display:none;height:100%;min-height:0}.chat-layout.open .chat-sidebar{display:none}.chat-layout.open .conversation{display:flex;height:100%}.mobile-back{display:block}.message-list{flex:1;min-height:0;height:auto;max-height:none;padding:14px}.bubble{max-width:96%}.stats-grid{gap:8px}.stat{padding:17px 12px}.stat .value{font-size:29px}.card{padding:20px}.caption{font-size:11px}.conversation-header{padding:12px}.top .logo{width:39px;height:39px}.section-heading+.caption{max-width:360px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.brand-logo{width:36px;height:36px;border-radius:11px;object-fit:cover;background:#77a5ff;flex-shrink:0}
.profile-avatar{position:relative;width:74px;height:74px;border-radius:24px;background:#2b3c5c;color:var(--accent);display:grid;place-items:center;font-size:30px;font-weight:750;overflow:hidden;flex-shrink:0}
.profile-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.msg-row{display:flex;align-items:flex-end;gap:8px;max-width:100%}
.msg-row.mine{flex-direction:row-reverse}
.msg-row .bubble{max-width:calc(100% - 52px)}
.msg-avatar{width:34px;height:34px;border-radius:12px;background:#354762;color:#bbd2f2;display:grid;place-items:center;font-size:13px;font-weight:750;position:relative;overflow:hidden;flex-shrink:0}
.msg-avatar i{font-style:normal}
.msg-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.bubble-foot{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:8px}
.bubble-foot .message-time{margin:0;flex:1}
.copy-btn{width:26px;height:26px;border:0;border-radius:8px;background:#ffffff12;color:var(--muted);display:grid;place-items:center;flex-shrink:0}
.copy-btn svg{width:14px;height:14px}
.copy-btn.done{color:var(--green);background:#1a3932}
.pc-result{margin-top:12px;display:grid;gap:8px}
.pc-result a,.pc-result code{word-break:break-all;font-size:12px}
.pc-result .subtle{justify-self:start}
.week-names{display:grid;gap:6px;margin-top:14px}
.week-names span{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:var(--muted);padding:8px 10px;border-radius:10px;background:#ffffff06}
.week-names span.top{color:var(--text);background:#1a3932}
.week-names b{font-weight:700;color:inherit}
.view-once{color:var(--muted);font-size:13px;padding:6px 10px;background:#ffffff05;border-radius:10px}
.lightbox{position:fixed;inset:0;z-index:60;background:#000000cc;backdrop-filter:blur(8px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:20px}
.lightbox img{max-width:100%;max-height:78dvh;border-radius:14px;box-shadow:0 20px 80px #000a}
.lightbox-actions{display:flex;gap:10px}
.lightbox-actions button,.lightbox-actions a{background:var(--panel);border:1px solid var(--line);color:var(--text);padding:10px 20px;border-radius:12px;font-weight:650;font-size:14px}
.lightbox-actions .lb-download{background:var(--accent);color:#112449;border:0}
.week-card{margin-top:26px;padding-top:20px;border-top:1px solid var(--line)}
.week-bars{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;align-items:end;height:150px;margin-top:12px}
.week-bar{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;height:100%}
.week-bar i{width:100%;max-width:34px;background:linear-gradient(180deg,var(--accent),var(--accent2));border-radius:8px;min-height:4px}
.week-bar.top i{background:linear-gradient(180deg,var(--green),#2ea87c)}
.week-bar b{font-size:10px;color:var(--muted);font-weight:600}
.week-bar small{font-size:10px;color:var(--muted)}
.streaks{margin-top:16px;grid-template-columns:1fr 1fr}
@media(min-width:1400px){.shell{max-width:1240px}.chat-layout{grid-template-columns:340px minmax(0,1fr)}}
@media(max-width:1100px) and (min-width:701px){.chat-layout{grid-template-columns:260px minmax(0,1fr)}.shell{max-width:900px}}
@media(max-width:700px){.brand-logo{width:39px;height:39px}}
r-radius:10px}}
/* Форматирование текста сообщений (ссылки, моно, спойлер, цитата) */
.message-body a{color:var(--accent);text-decoration:underline;text-underline-offset:2px;word-break:break-word}
.message-body code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.92em;background:#0003;border-radius:5px;padding:1px 5px}
.message-body pre code{background:none;padding:0}
.message-body .spoiler.revealed{color:inherit;background:#56617055}
.message-body blockquote.expandable{max-height:none}
/* GIF: без элементов управления, по кругу */
.media-animation video{background:transparent}
