:root{color-scheme:dark;--bg:#100b20;--panel:#191329;--line:#30253f;--muted:#9e90b7;--text:#f5f1fc;--accent:#a57bff;--green:#71dcba}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px Manrope,system-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:default}button:focus-visible,a:focus-visible{outline:2px solid #c5a7ff;outline-offset:4px}a{color:inherit;text-decoration:none}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.shell{max-width:1440px;min-height:100dvh;margin:auto;display:grid;grid-template-columns:256px 1fr}.sidebar{padding:38px 26px;border-right:1px solid var(--line);display:flex;flex-direction:column;position:sticky;top:0;height:100dvh}.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:25px;letter-spacing:-1.2px}.brand img{width:44px;height:44px;border-radius:13px}.side-caption{font-size:9px;letter-spacing:2px;color:var(--muted);margin:16px 0 38px}.nav-item{display:flex;gap:14px;align-items:center;padding:16px;margin-bottom:9px;border-radius:15px;color:var(--muted);font-weight:600}.nav-item.active{background:#a87fff18;color:#d8c3ff;border:1px solid #ad7cfb28}.side-bottom{margin-top:auto}.quiet-card{border:1px solid var(--line);border-radius:20px;padding:20px;color:#b3a4c7;background:linear-gradient(140deg,#36214855,transparent)}.quiet-card p{font-size:13px;line-height:1.7;margin-bottom:0}.spark{color:#d2b2ff;font-size:24px}.self{background:transparent;border:0;display:flex;gap:12px;align-items:center;width:100%;text-align:left;padding:22px 0}.self small{display:block;color:var(--muted);margin-top:4px;font-size:11px}.prototype{font-size:10px;line-height:1.7;color:#7f7194}main{padding:45px 48px 30px;background:transparent;min-width:0}.page-head{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:30px}.eyebrow{font-size:10px;letter-spacing:2px;color:#a18abf;margin-bottom:9px}.page-head h1{font-size:32px;letter-spacing:-1.2px;margin:0;font-weight:800}.subtitle{color:var(--muted);font-size:13px;margin:9px 0 0;line-height:1.7}.online-badge{padding:10px 14px;border:1px solid #63d8b62c;border-radius:30px;font-size:12px;color:var(--green);white-space:nowrap;background:#63d8b609}.dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--green);margin-right:6px}.filters{display:flex;gap:12px;margin:26px 0 18px}.field{height:50px;background:#21192f;border:1px solid var(--line);border-radius:14px;padding:0 15px;color:var(--text);outline:0;min-width:0}.field:focus{border-color:var(--accent)}.search{position:relative;flex:1}.search svg{position:absolute;left:16px;top:14px;color:var(--muted)}.search input{width:100%;padding-left:48px}.field::placeholder{color:#8b7e9f}.filter-btn,.icon-btn{background:#21192f;border:1px solid var(--line);border-radius:14px;display:grid;place-items:center;width:50px;height:50px}.filter-btn{display:flex;width:auto;padding:0 18px;gap:10px}.filter-btn.on{border-color:var(--accent)}.city-select{max-width:220px}.filter-extra{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:16px;background:var(--panel);border:1px solid var(--line);border-radius:16px;margin-bottom:18px}.filter-extra label{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:12px}.filter-extra input[type=number]{width:75px}.filter-extra .field{height:38px}.section-label{display:flex;justify-content:space-between;font-size:11px;color:#9e8db1;letter-spacing:1px;margin:25px 0 16px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.person{background:linear-gradient(135deg,#221831,#191329);border:1px solid var(--line);border-radius:20px;padding:22px;display:flex;align-items:center;gap:16px;transition:transform .2s,border-color .2s}.avatar{position:relative;border-radius:50%;background:radial-gradient(circle at 35% 25%,#5d4380,#20153c 75%);border:1px solid #6d4a9270;width:62px;height:62px;flex-shrink:0;display:grid;place-items:center;font-size:32px;box-shadow:inset 0 0 22px #8f57dc22}.avatar.small{width:42px;height:42px;font-size:23px}.avatar.large{width:112px;height:112px;font-size:61px}.avatar i{width:11px;height:11px;position:absolute;bottom:2px;right:2px;background:var(--green);border:2px solid #1b122a;border-radius:50%}.person-info{flex:1;min-width:0}.person-info h3{margin:0 0 6px;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.age{color:#ba9ad6;font-weight:500;font-size:12px;margin-left:6px}.city-line{color:var(--muted);font-size:12px;display:flex;align-items:center;gap:4px}.city-line svg{width:13px;height:13px}.status{margin-top:7px;font-size:11px;color:var(--green)}.status.off{color:#8b7d9e}.chat-button{width:39px;height:39px;border:1px solid #9470bc45;border-radius:12px;background:#9f6de818;color:#c6a4f5;display:grid;place-items:center}.note{font-size:11px;color:#8d7da3;line-height:1.7;margin:24px 0;text-align:center}.mobile-nav{display:none}.tabs{display:flex;gap:8px;margin:24px 0}.tab{border:1px solid var(--line);background:var(--panel);border-radius:30px;padding:10px 19px;color:var(--muted)}.tab.active{background:#a575ff22;color:#d9c4ff;border-color:#9c72d870}.dialog-list{max-width:740px}.dialog-row{display:flex;align-items:center;gap:16px;width:100%;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--line);padding:21px 0}.dialog-copy{flex:1;min-width:0}.dialog-copy strong{font-size:15px}.dialog-copy p{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:7px 0 0}.dialog-time{font-size:11px;color:var(--muted);text-align:right}.unread{background:#a276f0;color:#160d29;border-radius:30px;padding:3px 7px;display:block;margin-top:8px;font-weight:800}.empty{text-align:center;padding:55px 20px;color:var(--muted);line-height:1.8}.empty .spark{font-size:40px}.primary{background:linear-gradient(115deg,#b387ff,#7945e7);border:1px solid #c397ff50;border-radius:14px;padding:14px 24px;font-weight:700;box-shadow:0 6px 28px #7b40dc1a}.secondary{background:var(--panel);border:1px solid var(--line);border-radius:13px;padding:12px 20px}.chat-layout{height:calc(100dvh - 75px);display:flex;flex-direction:column;max-width:850px;margin:auto}.chat-head{display:flex;align-items:center;gap:13px;padding-bottom:22px;border-bottom:1px solid var(--line)}.chat-head .icon-btn{width:38px;height:38px}.chat-head .person-info h3{font-size:17px}.chat-head .status{margin-top:3px}.chat-head .avatar{width:48px;height:48px;font-size:27px}.messages{flex:1;overflow:auto;padding:25px 3px;display:flex;flex-direction:column;gap:14px;min-height:120px}.day{text-align:center;font-size:10px;letter-spacing:1px;color:#857495;margin:2px 0 12px}.message{align-self:flex-start;max-width:76%;min-width:70px}.message.mine{align-self:flex-end}.bubble{background:#2b223b;border:1px solid #77608b24;border-radius:18px 18px 18px 5px;padding:13px 17px;line-height:1.6;font-size:14px;overflow-wrap:anywhere}.mine .bubble{background:linear-gradient(120deg,#925cef,#7540df);border-radius:18px 18px 5px 18px;border-color:#c197ff25}.message-time{font-size:9px;color:#8e7ba5;margin:5px 5px;text-align:right}.message img{display:block;max-width:100%;max-height:300px;border-radius:12px;cursor:zoom-in}.message audio{max-width:100%;width:260px;height:38px}.composer{padding:18px 0 8px;border-top:1px solid var(--line);display:flex;gap:10px;align-items:flex-end}.composer-box{display:flex;align-items:center;flex:1;border:1px solid var(--line);background:#21192f;border-radius:20px;padding:5px 10px}.composer textarea{resize:none;flex:1;min-width:0;background:transparent;color:var(--text);border:0;outline:0;padding:13px 8px;max-height:110px;font:inherit;height:48px}.composer-box button{background:transparent;border:0;color:#aa93c3;display:grid;place-items:center;padding:8px}.send-btn{background:linear-gradient(130deg,#b080fc,#7541e2);border:1px solid #c297ff50;border-radius:18px;width:58px;height:58px;display:grid;place-items:center;touch-action:none;user-select:none}.chat-hint{text-align:center;color:#7d6a91;font-size:10px;margin:7px 0}.profile-wrap{max-width:650px;margin:auto}.profile-top{display:flex;flex-direction:column;align-items:center;padding:7px 0 30px;gap:15px}.profile-top h2{margin:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.form-grid label{display:flex;flex-direction:column;gap:9px;color:#b2a1c7;font-size:12px}.form-grid .field{width:100%}.profile-actions{display:flex;justify-content:flex-end;margin-top:25px}.settings{margin-top:30px;border-top:1px solid var(--line);padding-top:15px}.settings button{display:flex;align-items:center;gap:12px;padding:15px 0;width:100%;border:0;background:transparent;text-align:left;color:var(--muted)}.settings .danger{color:#e698af}.avatar-options{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.avatar-option{background:var(--panel);border:1px solid var(--line);padding:15px;border-radius:16px;display:grid;place-items:center}.avatar-option.active{border-color:var(--accent)}dialog{background:#1b132c;color:var(--text);border:1px solid #6b4c89;border-radius:24px;padding:25px;width:min(460px,calc(100% - 30px));max-height:90dvh;overflow:auto;box-shadow:0 30px 100px #0008}dialog::backdrop{background:#08040dba;backdrop-filter:blur(7px)}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.modal-head h2{font-size:19px;margin:0}.modal-head button{border:0;background:transparent;color:var(--muted);font-size:26px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.modal-copy{color:var(--muted);line-height:1.8;font-size:13px}.record-info{text-align:center;padding:12px;font-size:24px;color:#d8b7ff}.record-info small{display:block;font-size:12px;color:var(--muted);margin-top:10px}#wave{width:100%;height:85px;background:#110b20;border-radius:12px}.trim-label{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;margin:14px 0 6px}.trim-range{width:100%;accent-color:#b483ff}.voice-preview{width:100%;margin:15px 0 0}.lightbox{width:auto;max-width:90vw}.lightbox img{max-width:100%;max-height:75dvh;border-radius:12px}#toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);padding:13px 22px;border:1px solid #70528c;background:#2e2140;border-radius:14px;z-index:20;opacity:0;pointer-events:none;transition:opacity .2s;max-width:90vw;text-align:center;font-size:13px}#toast.show{opacity:1}.demo-tag{font-size:10px;border:1px solid #58446b;padding:5px 9px;border-radius:8px;color:#ad97c4;margin-left:8px;vertical-align:middle}
@media(min-width:1300px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.person{padding:20px 16px;gap:12px}.avatar{width:54px;height:54px;font-size:29px}}@media(max-width:1050px){main{padding:35px 28px}.shell{grid-template-columns:220px 1fr}.sidebar{padding:30px 20px}.person{padding:17px;gap:12px}.city-select{max-width:180px}.filter-btn span{display:none}}
@media(max-width:760px){.shell{display:block}.sidebar{display:none}main{padding:24px 20px 100px;min-height:100dvh}.mobile-brand{display:flex;margin-bottom:26px;justify-content:space-between;align-items:center}.mobile-brand .brand{font-size:23px}.mobile-brand .brand img{width:36px;height:36px}.page-head{margin-bottom:20px}.page-head h1{font-size:28px}.subtitle{font-size:12px}.online-badge{font-size:10px;padding:8px 10px}.filters{flex-wrap:wrap;gap:9px;margin-top:20px}.search{flex-basis:calc(100% - 59px)}.filter-btn{width:50px;padding:0}.city-select{max-width:none;width:100%;order:3}.grid{display:flex;flex-direction:column;gap:0}.person{padding:17px 0;border:0;border-bottom:1px solid #30253f;background:transparent;border-radius:0;gap:15px}.person .avatar{width:56px;height:56px;font-size:29px}.person-info h3{font-size:16px}.chat-button{width:42px;height:42px}.section-label{margin-top:22px}.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;justify-content:space-around;padding:12px 10px calc(10px + env(safe-area-inset-bottom));background:#130d22ed;backdrop-filter:blur(18px);border-top:1px solid var(--line);z-index:5}.mobile-nav .nav-item{flex-direction:column;gap:6px;font-size:10px;padding:0 16px;margin:0;border:0;background:transparent}.mobile-nav .nav-item.active{color:#ba91ff}.mobile-nav .nav-item.active:after{content:'';height:2px;width:24px;background:#ba91ff;position:absolute;top:0}.chat-layout{height:calc(100dvh - 34px - env(safe-area-inset-bottom));max-width:none}.chat-mode main{padding:18px 15px 0}.chat-mode .mobile-nav{display:none}.chat-head{padding-bottom:15px}.chat-head .person-info h3{font-size:16px}.messages{padding:20px 1px}.message{max-width:85%}.bubble{font-size:14px;padding:12px 15px}.composer{padding-top:12px}.composer textarea{font-size:14px}.send-btn{width:52px;height:54px}.chat-hint{margin-bottom:12px}.form-grid{gap:16px}.profile-top{padding-top:5px}.profile-actions .primary{width:100%}.profile-actions{margin-top:22px}#toast{bottom:100px}.chat-mode #toast{bottom:95px}.demo-tag{font-size:8px}.dialog-row{padding:19px 0}.dialog-row .avatar{width:55px;height:55px;font-size:29px}}
@media(min-width:761px){.mobile-brand{display:none}}

/* Compact directory header and stable filter alignment. */
.people-head{justify-content:flex-end;margin-bottom:12px}.filter-btn{justify-content:center;flex-shrink:0}
@media(max-width:760px){.filters{display:grid;grid-template-columns:minmax(0,1fr) 50px;gap:9px}.filters .search{grid-column:1;grid-row:1}.filters .filter-btn{grid-column:2;grid-row:1;justify-content:center}.filters .city-select{grid-column:1/-1;grid-row:2}.people-head{margin-bottom:12px}}
/* Match the approved four-screen reference. */
:root{--bg:#100b20;--panel:#1c152d;--line:#342846;--muted:#b0a0cf;--accent:#a86cff;--green:#43ed80}body{background:#100b20}main{background:transparent}.mobile-brand{display:flex;justify-content:center;align-items:center;margin:0 0 22px}.mobile-brand .brand{font-size:22px;letter-spacing:-.7px;gap:8px}.mobile-brand .brand img{width:34px;height:34px;border-radius:8px}.sidebar>.brand,.side-caption,.quiet-card{display:none}.sidebar nav{margin-top:55px}.people-head{justify-content:space-between;align-items:center;margin:0 0 12px}.page-head h1{font-size:30px;letter-spacing:-.8px}.online-badge{background:none;border:0;padding:0;font-size:12px;color:#c9b9df}.online-badge .dot{width:9px;height:9px}.filters{margin:12px 0 8px;gap:10px}.field{background:linear-gradient(115deg,#2b203b,#231a33);border-color:#524069;height:44px;border-radius:12px;font-size:13px}.filter-btn{height:44px;width:44px;border-color:#524069;border-radius:12px;padding:0;background:#271c38}.filter-btn span{display:none}.search svg{top:11px;width:20px;height:20px}.search input{padding-left:43px}.grid{gap:0 28px}.person{border:0;border-bottom:1px solid #392b46;border-radius:0;padding:13px 0;background:transparent;gap:15px}.person-info h3{margin-bottom:5px;font-size:16px;font-weight:700}.age{margin-left:0;font-size:inherit;font-weight:500;color:var(--text)}.status{font-size:12px;margin:0 0 3px;color:#64edaf;display:flex;align-items:center;gap:6px}.status.off{color:#a899bc}.presence-dot{background:#43ed80;width:9px;height:9px;display:inline-block;border-radius:50%;flex-shrink:0}.off .presence-dot{background:#81709f}.city-line{font-size:12px;color:#c1b0da}.chat-button{background:linear-gradient(130deg,#39264c,#22182f);border:1px solid #59416b;width:42px;height:42px;border-radius:12px;color:#e1cbfa}.avatar{width:64px;height:64px;border:1px solid #c19eff88;box-shadow:0 0 15px #7739bf16;background-color:#201332}.avatar i{display:none}.avatar.small{width:42px;height:42px}.avatar.large{width:140px;height:140px}.tabs{border:1px solid #392b4d;background:#292036;display:flex;gap:0;border-radius:14px;width:max-content;padding:3px;margin:16px 0 8px}.tab{border:0;background:transparent;border-radius:11px;padding:9px 22px;font-size:12px;color:#dbc8f3}.tab.active{background:linear-gradient(120deg,#c68cff,#7732fc);color:#1e092e;font-weight:800;box-shadow:0 0 18px #a565fc55}.dialog-row{padding:20px 0;border-color:#372a43}.dialog-copy strong{font-size:16px}.dialog-copy p{font-size:13px;color:#c6b3df}.dialog-time{font-size:12px;color:#9f83be}.unread{background:linear-gradient(140deg,#ca82ff,#8734ff);box-shadow:0 0 14px #9c49ff55;font-size:12px;color:#210836}.primary{background:linear-gradient(120deg,#c37aff,#8738ff 75%);box-shadow:0 0 20px #ae5bff25;border-color:#b575ff;font-size:13px}.secondary{background:#21182e;border-color:#71508c;font-size:12px}.profile-wrap{max-width:500px}.profile-top{padding:0 0 24px}.profile-wrap .page-head{margin-bottom:15px}.profile-wrap form{border:1px solid #362740;border-radius:17px;padding:12px;background:linear-gradient(135deg,#21152d55,transparent)}.form-grid{display:flex;flex-direction:column;gap:8px}.form-grid label{display:grid;grid-template-columns:90px minmax(0,1fr);align-items:center;gap:10px;color:#c1acd9;font-size:13px}.form-grid .field{height:38px;background:#21172d;border-color:#33243f;border-radius:9px}.profile-actions{display:flex;flex-direction:column;gap:10px;margin-top:12px}.profile-actions button{width:100%;padding:13px}.settings{margin-top:20px;border-color:#34263e}.settings button{padding:14px 0;color:#c7b4dc;font-size:13px}.settings .danger{color:#d199ae}.chat-layout{position:relative}.chat-brand{display:flex;justify-content:center;margin:0 0 24px}.chat-brand .brand{font-size:22px}.chat-brand .brand img{width:34px;height:34px;border-radius:8px}.chat-head{border:0;padding-bottom:12px}.chat-head>.icon-btn:first-child{position:absolute;top:0;left:0}.chat-head>#chat-menu{position:absolute;top:0;right:0}.chat-head .icon-btn{background:transparent;border:0}.chat-head .avatar{width:68px;height:68px}.chat-head .status{font-size:12px;color:#c5b3db}.chat-head .person-info h3{font-size:17px;margin-bottom:7px}.chat-head .age{display:none}.bubble{background:linear-gradient(135deg,#352a42,#2a2135);border:0;border-radius:18px;font-size:14px}.mine .bubble{background:linear-gradient(120deg,#9e5bff,#682dec);border-radius:18px}.message-time{color:#947cad;font-size:10px}.composer{border:0;padding-top:14px;padding-bottom:10px;background:#171022;border-radius:24px 24px 0 0;margin:0 -8px}.composer-box{border-radius:28px;background:linear-gradient(120deg,#30253d,#241b31);border-color:#59406c}.send-btn{border-radius:50%;background:linear-gradient(145deg,#a461ff,#6324ef);width:52px;height:52px;flex-shrink:0}.mobile-nav{background:#150e23f5;border-color:#392947}.mobile-nav .nav-item{color:#a995c5}.mobile-nav .nav-item.active{color:#be82ff}.mobile-nav .nav-item.active:after{top:auto;bottom:calc(3px + env(safe-area-inset-bottom));width:42px;background:#bb78ff;height:2px}.mobile-nav svg{width:23px;height:23px}.mobile-nav .active svg{fill:#a968ff;stroke:#bd8aff}
@media(max-width:760px){main{padding:19px 20px 92px}.mobile-brand{margin-bottom:20px}.page-head h1{font-size:28px}.people-head{margin-bottom:12px}.filters{grid-template-columns:minmax(0,1fr) 44px;gap:9px;margin-top:10px}.filters .filter-btn{width:44px}.filters .city-select{height:44px}.person{padding:9px 0;gap:14px}.person .avatar{width:62px;height:62px}.person-info h3{font-size:15px;margin-bottom:4px}.status,.city-line{font-size:12px}.chat-button{width:40px;height:40px}.dialog-row{padding:18px 0}.dialog-row .avatar{width:64px;height:64px}.dialog-copy strong{font-size:15px}.dialog-copy p{font-size:12px}.profile-top{padding-bottom:20px}.profile-top .avatar{width:138px;height:138px}.profile-actions{margin-top:12px}.chat-mode main{padding:16px 16px 0}.chat-layout{height:calc(100dvh - 20px - env(safe-area-inset-bottom))}.chat-brand{margin-bottom:20px}.chat-head .avatar{width:68px;height:68px}.chat-head{padding-bottom:12px}.messages{padding-top:15px;gap:15px}.composer{padding:12px 9px calc(9px + env(safe-area-inset-bottom));gap:8px}.composer textarea{font-size:13px;padding-left:4px}.composer-box{padding-left:5px;padding-right:6px}.composer-box button{padding:6px}.mobile-nav{padding-top:11px}.mobile-nav .nav-item{font-size:10px;gap:5px}}

/* City lives in the filter panel; centre the wordmark itself. */
.filters{align-items:center}.filter-city-label .city-select{width:200px;max-width:100%}.mobile-brand .brand,.chat-brand .brand{position:relative;display:block;width:max-content;text-align:center;font-size:28px;line-height:46px;letter-spacing:-.8px}.mobile-brand .brand img,.chat-brand .brand img{position:absolute;right:calc(100% + 12px);top:3px;width:40px;height:40px;border-radius:10px}.mobile-brand{margin-bottom:22px}.chat-brand{margin-bottom:22px}
@media(max-width:760px){.filters{grid-template-columns:minmax(0,1fr) 44px}.filter-extra{display:grid;grid-template-columns:1fr 1fr;gap:12px}.filter-extra .filter-city-label{grid-column:1/-1;display:flex;flex-direction:column;align-items:stretch;gap:8px}.filter-extra .filter-city-label .city-select{width:100%;max-width:none;height:42px}.filter-extra label{min-width:0}.filter-extra .field{min-width:0}.mobile-brand .brand,.chat-brand .brand{font-size:28px;line-height:46px}.mobile-brand .brand img,.chat-brand .brand img{width:40px;height:40px;right:calc(100% + 10px)}}
/* Keep mobile app screens focused on people and conversations. */
.sidebar>.brand{display:flex}.sidebar nav{margin-top:35px}.mobile-brand,.chat-brand{display:none}.chat-head>.icon-btn:first-child,.chat-head>#chat-menu{position:static}.chat-head{padding-bottom:15px}.chat-head>#chat-menu{margin-left:auto}
@media(max-width:760px){main{padding-top:20px}.chat-mode main{padding-top:16px}}
/* Account entry uses the same violet palette as the chat. */
body.auth-mode .sidebar,body.auth-mode #mobile-nav{display:none!important}
body.auth-mode #main{width:100%;max-width:none;margin:0;min-height:100dvh;padding:40px 20px;display:flex;align-items:center;justify-content:center}
.auth-card{width:100%;max-width:420px;padding:32px;border:1px solid #49375f;border-radius:28px;background:linear-gradient(145deg,#20162f,#140f22);box-shadow:0 24px 80px #05020c55}
.auth-brand{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:28px;font-size:30px;font-weight:800;letter-spacing:-1px}.auth-brand img{width:48px;height:48px;border-radius:14px}
.auth-tabs{margin-bottom:26px;width:100%;display:flex}.auth-tabs .tab{flex:1}.auth-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.auth-heading h1{font-size:26px;margin:0;letter-spacing:-.6px}.auth-step{color:#b899da;font-size:14px}
#auth-form>label,.auth-pair label{display:block;color:#e5dbf1;font-size:14px;margin:0 0 17px}#auth-form .field{margin-top:8px;width:100%;height:48px;font-size:16px}#auth-form select{appearance:auto}.auth-pair{display:grid;grid-template-columns:1fr 1fr;gap:16px}.input-hint{font-size:12px;line-height:1.5;color:#a59ab9;margin:-9px 0 18px}.optional{font-size:12px;color:#a59ab9;margin-left:4px}.auth-note{font-size:12px;line-height:1.65;color:#a59ab9;margin:20px 0 0;text-align:center}.auth-submit{width:100%;min-height:48px;margin-top:5px}.auth-back{background:none;border:0;color:#c6a6ff;padding:15px;width:100%;font-size:14px;cursor:pointer}.auth-error{border:1px solid #a24f77;background:#57203940;border-radius:12px;padding:12px;color:#ffc2d8;font-size:14px;line-height:1.5}.password-field{position:relative}.password-field input{padding-right:86px}.password-field button{position:absolute;right:12px;top:8px;height:48px;border:0;background:none;color:#c6a6ff;font-size:12px;cursor:pointer}.auth-card button:disabled{opacity:.6;cursor:wait}
@media(max-width:760px){body.auth-mode #main{padding:24px 20px;align-items:center}.auth-card{border:none;background:none;box-shadow:none;padding:20px 0;max-width:380px}.auth-brand{margin-bottom:34px;font-size:34px}.auth-brand img{width:54px;height:54px}.auth-heading h1{font-size:26px}}

body.auth-mode .shell{display:block;max-width:none}body.auth-mode{padding-bottom:0}

.form-grid input[readonly]{color:#b0a0cf;cursor:default}

/* Compact conversation: normal document flow, one internal message scroller. */
.bubble{display:flow-root}.message-content{white-space:pre-wrap}.bubble .message-time{float:right;display:inline-block;margin:5px 0 -2px 9px;line-height:12px;white-space:nowrap;font-size:10px}
@media(max-width:760px){
 .field,input,select,textarea{font-size:16px}
 html.chat-viewport-locked{height:100%;overflow:hidden;overscroll-behavior:none}
 body.chat-mode{position:static;width:100%;height:100%;min-height:0;overflow:hidden;overscroll-behavior:none}
 body.chat-mode .shell{display:block;width:100%;height:var(--chat-viewport-height,100dvh);min-height:0;overflow:hidden}
 body.chat-mode #main{position:relative;top:auto;left:auto;width:100%;height:100%;min-height:0;max-height:none;padding:6px 8px 0;overflow:hidden;overflow-anchor:none}
 body.chat-mode .chat-layout{display:flex;width:100%;height:100%;min-height:0;max-width:none;margin:0;overflow:hidden;transition:none}
 body.chat-mode .chat-head{flex:0 0 auto;min-width:0;gap:9px;padding:4px 2px 8px;min-height:54px;overflow-anchor:none}
 body.chat-mode .chat-head .avatar{width:40px;height:40px}
 body.chat-mode .chat-head .icon-btn{width:32px;height:36px;flex-shrink:0}
 body.chat-mode .chat-head .icon-btn svg{width:21px;height:21px}
 body.chat-mode .chat-head .person-info h3{font-size:15px;line-height:19px;margin-bottom:2px}
 body.chat-mode .chat-head .status{font-size:11px;line-height:15px;margin:0}
 body.chat-mode .messages{flex:1 1 0;min-height:0;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding:8px 2px 10px;gap:8px;overflow-anchor:none}
 body.chat-mode .message{max-width:88%;min-width:70px}
 body.chat-mode .bubble{font-size:15px;line-height:1.35;padding:8px 11px;border-radius:15px}
 body.chat-mode .bubble .message-time{font-size:10px;margin-top:5px}
 body.chat-mode .composer{flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:end;gap:7px;width:100%;max-width:100%;min-width:0;margin:0;padding:6px 5px calc(6px + env(safe-area-inset-bottom));border-radius:18px 18px 0 0;overflow-anchor:none}
 body.chat-mode.keyboard-open .composer{padding-bottom:6px}
 body.chat-mode .composer-box{width:100%;min-width:0;overflow:hidden;padding:0 5px;border-radius:23px}
 body.chat-mode .composer-box button{width:30px;height:40px;padding:4px;flex-shrink:0}
 body.chat-mode .composer-box button svg{width:21px;height:21px}
 body.chat-mode .composer textarea{font-size:16px;line-height:22px;width:100%;min-width:0;height:40px;max-height:100px;padding:9px 4px}
 body.chat-mode .send-btn{width:44px;height:44px;min-width:0}
 body.chat-mode .send-btn svg{width:23px;height:23px}
 body.chat-mode #toast{bottom:calc(100dvh - var(--chat-viewport-height,100dvh) + 70px)}
}

/* Reserve timestamp space on the final text line, including wrapped messages. */
.message .bubble{position:relative;font-size:16px;line-height:1.35;padding:8px 11px}
.message .message-content{white-space:pre-wrap;overflow-wrap:anywhere}
.message-time-space{display:inline-block;visibility:hidden;height:0;margin-left:9px;font-size:11px;line-height:12px;white-space:nowrap;vertical-align:baseline}
.message .bubble .message-time{position:absolute;right:11px;bottom:6px;float:none;margin:0;font-size:11px;line-height:12px;white-space:nowrap;color:#b3a0c9;pointer-events:none}
.message.mine .bubble .message-time{color:#dfc9ff}
.message.has-media .bubble{padding-bottom:24px}
@media(max-width:760px){
 .dialogs-view .page-head{margin-bottom:12px}
 .dialogs-view .page-head h1{font-size:23px;line-height:29px;letter-spacing:-.6px}
 .dialogs-view .tabs{margin:12px 0 10px}
 .dialogs-view .tab{padding:8px 17px;font-size:14px;line-height:20px}
 .dialogs-view .dialog-row{position:relative;display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:12px;min-height:78px;padding:10px 0;border-bottom:0;align-items:center}
 .dialogs-view .dialog-row:after{content:"";position:absolute;bottom:0;left:68px;right:0;height:1px;background:var(--line)}
 .dialogs-view .dialog-row .avatar{width:56px;height:56px;font-size:29px}
 .dialogs-view .dialog-copy strong{display:block;font-size:17px;line-height:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .dialogs-view .dialog-copy p{font-size:15px;line-height:21px;margin:3px 0 0}
 .dialogs-view .dialog-time{align-self:start;padding-top:5px;font-size:13px;line-height:19px;white-space:nowrap}
 .dialogs-view .unread{width:max-content;min-width:21px;margin:6px 0 0 auto;padding:1px 6px;font-size:12px;line-height:19px;text-align:center}
 body.chat-mode .message .bubble{font-size:16px;line-height:1.35;padding:8px 11px}
 body.chat-mode .message .bubble .message-time{font-size:11px;margin:0}
 body.chat-mode .message.has-media .bubble{padding-bottom:24px}
}

/* Keep the chat inside Safari's visual viewport across repeated keyboard opens. */
@media(max-width:760px){
 body.chat-mode{position:static}
 body.chat-mode .shell{position:absolute;top:var(--chat-viewport-top,0px);left:0;right:0;width:100%;max-width:none;margin:0;height:var(--chat-viewport-height,100dvh);min-height:0;overflow:hidden;transition:none}
}

/* Photos occupy their own message surface, without padding around the image. */
.message{flex-shrink:0}
.message.photo-message{width:280px;min-width:0;max-width:min(82%,320px)}
.message.photo-message .bubble,body.chat-mode .message.photo-message .bubble{padding:0;border:0;overflow:hidden;border-radius:15px;background:#21192f}
.message.photo-message .message-content{display:block;white-space:normal}
.message.photo-message img{display:block;width:100%;max-width:100%;height:auto;max-height:none;border-radius:0;object-fit:contain}
.message.photo-message:not(.has-caption) .message-time{right:7px;bottom:7px;padding:3px 6px;border-radius:9px;background:#0008;color:#fff;line-height:12px}
.message.photo-message .photo-caption{padding:8px 11px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.35}
.message.photo-message.has-caption.mine .bubble{background:linear-gradient(120deg,#9e5bff,#682dec)}
.message.photo-message.has-caption .message-time{bottom:6px}
.attachment-draft{position:relative;grid-column:1/-1;flex:0 0 100%;height:82px;width:82px;margin-bottom:4px}
.attachment-draft[hidden]{display:none}
.attachment-draft img{display:block;width:82px;height:82px;object-fit:cover;border-radius:12px;border:1px solid #70528c}
.remove-attachment{position:absolute;top:-4px;right:-5px;display:grid;place-items:center;width:27px;height:27px;border:1px solid #ffffff45;border-radius:50%;background:#21192f;color:#fff;font-size:22px;line-height:1;padding:0}
.composer:has(.attachment-draft:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) 52px;gap:8px 10px}
body.chat-mode .composer:has(.attachment-draft:not([hidden])){grid-template-columns:minmax(0,1fr) 44px;gap:6px 7px}
dialog.photo-viewer{position:fixed;inset:auto;top:var(--photo-viewer-top,0px);left:0;margin:0;width:100vw;max-width:none;height:var(--photo-viewer-height,100dvh);max-height:none;padding:0;border:0;border-radius:0;background:#000;box-shadow:none;overflow:hidden;color:#fff}
dialog.photo-viewer[open]{display:flex;flex-direction:column}
dialog.photo-viewer::backdrop{background:#000;backdrop-filter:none}
.photo-viewer-head{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:12px;flex:0 0 auto;padding:calc(env(safe-area-inset-top) + 12px) 16px 12px;font-size:17px}
.photo-viewer-head button,.photo-viewer-actions button{width:44px;height:44px;display:grid;place-items:center;background:#1c1c1c;border:1px solid #ffffff30;border-radius:50%;color:#fff;padding:0;flex-shrink:0}
.photo-viewer-head button:focus:not(:focus-visible),.photo-viewer-actions button:focus:not(:focus-visible){outline:none;box-shadow:none}
.photo-viewer-head button svg,.photo-viewer-actions button svg{width:25px;height:25px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
.photo-viewer-identity{justify-self:center;min-width:0;max-width:280px;width:100%;display:flex;flex-direction:column;align-items:center;padding:5px 14px;background:#1c1c1c;border:1px solid #ffffff30;border-radius:28px;line-height:1.3}
.photo-viewer-identity strong,.photo-viewer-identity span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.photo-viewer-identity span{color:#999;font-size:13px;font-weight:400}
.photo-viewer-stage{display:flex;align-items:center;justify-content:center;flex:1 1 0;min-height:0;overflow:hidden}
.photo-viewer-stage img{display:block;width:100%;height:100%;object-fit:contain;touch-action:pinch-zoom}
.photo-viewer-caption{flex:0 0 auto;max-height:15%;overflow:auto;padding:12px 17px;font-size:16px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}
.photo-viewer-actions{display:flex;justify-content:flex-end;align-items:center;flex:0 0 auto;padding:12px 16px calc(env(safe-area-inset-bottom) + 12px)}
.message.photo-message,body.chat-mode .message.photo-message{max-width:min(65%,300px)}
.message.photo-message .bubble,body.chat-mode .message.photo-message .bubble{border:1px solid #a66ae8;border-radius:16px;background:#281f36}
.message.photo-message.mine .bubble,body.chat-mode .message.photo-message.mine .bubble{background:linear-gradient(120deg,#9e5bff,#682dec);border-color:#ab70f2}


/* Profile: portrait and identity above vertically stacked fields. */
.profile-redesign{max-width:560px;margin:0 auto}.profile-redesign .profile-top{display:flex;flex-direction:column;align-items:center;padding:22px 0 32px}.profile-avatar-wrap{position:relative}.profile-redesign .profile-top .avatar{width:132px;height:132px}.avatar-edit{position:absolute;right:-3px;bottom:-3px;width:44px;height:44px;display:grid;place-items:center;border-radius:50%;border:4px solid var(--bg);background:linear-gradient(130deg,#bc7aff,#7833ee);box-shadow:0 5px 20px #8738ff33}.avatar-edit svg{width:22px;height:22px}.profile-identity{display:flex;justify-content:center;align-items:baseline;gap:10px;max-width:100%;margin:24px 0 0;font-size:27px;line-height:1.25;letter-spacing:-.6px}.profile-identity>span:first-child{overflow-wrap:anywhere;min-width:0}.profile-age{font-weight:400;color:var(--muted);flex-shrink:0}.profile-city{color:var(--muted);margin:12px 0 0;font-size:16px}.profile-redesign form{border:0;background:none;padding:0}.profile-section-label{text-transform:uppercase;color:var(--muted);font-size:12px;font-weight:700;letter-spacing:1px;margin-bottom:22px}.profile-redesign .form-grid{gap:22px}.profile-redesign .form-grid label{display:flex;flex-direction:column;align-items:stretch;gap:10px;font-size:16px;color:var(--text);font-weight:600}.profile-redesign .form-grid .field{width:100%;height:54px;border-radius:16px;border-color:#4b395f;background:linear-gradient(120deg,#2a2038,#20182d);font-size:16px;padding:0 18px;font-weight:400}.nickname-field{position:relative}.profile-redesign .nickname-field .field{padding-right:68px}.nickname-field>span{position:absolute;right:17px;top:18px;color:var(--muted);font-weight:400;font-size:13px}.nickname-hint{margin:-12px 0 0;font-size:12px;line-height:1.5;color:var(--muted)}.profile-redesign .profile-actions{margin-top:26px}.profile-redesign .profile-actions button{min-height:52px;font-size:16px;border-radius:16px}.random-avatar{width:100%;margin-bottom:18px;padding:12px}.profile-redesign .optional{font-size:12px;font-weight:400;color:var(--muted)}
@media(max-width:760px){.profile-redesign .profile-top{padding-top:12px}.profile-redesign .settings{margin-top:28px}}

.search-head-actions{display:flex;align-items:center;gap:12px}.hide-profile-btn{width:38px;height:38px;border-radius:12px;color:var(--muted)}.search-hidden{max-width:480px;margin:48px auto;text-align:center;padding:28px 22px;border:1px solid var(--line);border-radius:22px;background:var(--panel)}.hidden-symbol{display:inline-grid;place-items:center;width:64px;height:64px;border-radius:20px;background:#a575ff18;color:#c297ff;margin-bottom:14px}.hidden-symbol svg{width:30px;height:30px}.search-hidden h2{font-size:21px;line-height:1.35;margin:0 0 12px}.search-hidden p{font-size:15px;line-height:1.6;color:var(--muted);margin:0 0 24px}.search-hidden .primary{padding:14px 18px;width:100%;font-size:15px}.visibility-actions{display:flex;gap:10px;margin-top:24px}.visibility-actions button{flex:1;padding:13px 10px;min-height:46px}.visibility-actions .primary{font-size:13px}

/* Compact chat identity and avatar presence. */
.dialogs-view .dialog-identity{display:flex;align-items:baseline;gap:5px;min-width:0;line-height:22px}.dialogs-view .dialog-identity strong{display:block;flex:0 1 auto;min-width:0;max-width:60%;font-size:16px;line-height:22px}.dialogs-view .dialog-age{flex-shrink:0;font-size:12px;color:var(--muted);font-weight:400}.dialogs-view .dialog-city{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--muted);font-weight:400}.dialogs-view .avatar i{display:block;width:13px;height:13px;right:0;bottom:0;border:2px solid var(--bg);border-radius:50%;background:#43ed80;box-shadow:none}

/* Shared identity hierarchy: nickname and age, then optional city. */
.person .person-identity{display:flex;align-items:baseline;gap:0;min-width:0;margin-bottom:5px}.person-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.person .person-identity .age{flex-shrink:0;margin:0;color:var(--muted);font-weight:400}.person .city-line{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.person .avatar i{display:block;width:13px;height:13px;right:0;bottom:0;border:2px solid var(--bg);background:#43ed80;border-radius:50%}.dialogs-view .dialog-identity{gap:0}.dialogs-view .dialog-identity strong{max-width:none;flex:0 1 auto}.dialogs-view .dialog-age{font-size:14px}.dialogs-view .dialog-city{display:block;font-size:12px;line-height:17px;margin-top:1px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dialogs-view .dialog-copy p{margin-top:2px}.dialogs-view .dialog-row{min-height:84px}

.dialogs-view .dialog-row{min-height:78px}.dialogs-view .dialog-copy p{margin-top:3px}

/* Search filters: modal sheet with draft controls. */
dialog.filter-sheet{width:min(100%,560px);max-width:560px;max-height:90dvh;padding:24px;border-radius:26px;background:#1c142c;color:var(--text);border:1px solid #4c365f;overflow-y:auto}.filter-sheet::backdrop{background:#0009;backdrop-filter:blur(2px)}.filter-sheet .modal-head{margin-bottom:24px}.filter-sheet .modal-head h2{font-size:24px}.filter-group{margin:0 0 24px;padding:0;border:0;min-width:0}.filter-label{display:block;font-size:16px;font-weight:700;line-height:1.5;margin-bottom:14px}.filter-label output{font-weight:400}.age-range{position:relative;height:40px;margin:0 12px}.age-track{position:absolute;top:17px;left:0;right:0;height:6px;border-radius:6px;background:#423151}.age-track>div{position:absolute;top:0;bottom:0;border-radius:6px;background:linear-gradient(90deg,#c087ff,#8640f3)}.age-range input{appearance:none;-webkit-appearance:none;position:absolute;width:calc(100% + 24px);height:40px;left:-12px;top:0;margin:0;background:transparent;pointer-events:none;border:0;outline:none}.age-range input:last-child{z-index:3}.age-range input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:26px;height:26px;border-radius:50%;background:#b775ff;box-shadow:0 2px 7px #0006;pointer-events:auto;cursor:grab;border:0}.age-range input::-moz-range-thumb{width:26px;height:26px;border-radius:50%;background:#b775ff;border:0;pointer-events:auto;cursor:grab}.age-range input:focus-visible::-webkit-slider-thumb{outline:2px solid #eee;outline-offset:3px}.gender-options{display:flex;gap:12px}.gender-options button{flex:1;background:transparent;border:1px solid #655073;border-radius:24px;padding:12px 18px;font-weight:600;font-size:16px}.gender-options button.selected{background:#a268ff25;border-color:#ba84ff;color:#d7bcff}.filter-group select{width:100%;height:52px;font-size:16px;border-radius:15px}.filter-online{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:14px;margin:0 0 24px}.filter-online input{accent-color:#a86cff;width:18px;height:18px}.filter-sheet-actions{display:flex;gap:12px;position:sticky;bottom:-24px;background:#1c142c;padding:12px 0 4px}.filter-sheet-actions button{flex:1;min-height:52px;font-size:16px;border-radius:16px}
@media(max-width:760px){dialog.filter-sheet{position:fixed;inset:auto 0 0;margin:0;max-width:none;width:100%;border-radius:28px 28px 0 0;padding:28px 24px calc(20px + env(safe-area-inset-bottom));max-height:90dvh;animation:filter-rise .22s ease-out}.filter-sheet:before{content:"";display:block;width:42px;height:4px;background:#695477;border-radius:3px;margin:-16px auto 22px}.filter-sheet-actions{bottom:calc(-20px - env(safe-area-inset-bottom));padding-bottom:calc(4px + env(safe-area-inset-bottom))}}
@keyframes filter-rise{from{transform:translateY(70px);opacity:.4}to{transform:translateY(0);opacity:1}}@media(prefers-reduced-motion:reduce){dialog.filter-sheet{animation:none}}

button.person{width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer}button.person:active{background:#a774ff10}

.auth-brand-button{width:100%;padding:0;border:0;background:transparent;color:inherit;border-radius:14px}.auth-brand-button:hover{color:#dec6ff}.auth-brand-button:active{opacity:.85}

.welcome-faq .faq-planned{display:block;width:max-content;margin:0 0 10px;padding:3px 10px;border:1px solid #a875ff30;border-radius:12px;background:#a875ff0e;color:#c69bff;font-size:11px;line-height:18px}

/* Scrollable welcome sections and native FAQ disclosure. */
body.welcome-mode #main{display:block;padding-bottom:0}.welcome-page{max-width:860px;width:100%;margin:auto}.welcome-page .welcome-card{min-height:calc(100svh - 40px);display:flex;flex-direction:column;justify-content:center;padding:16px 0 24px}.welcome-scroll{align-self:center;display:flex;align-items:center;gap:10px;background:none;border:0;color:var(--muted);font-size:13px;margin-top:30px;padding:10px}.welcome-scroll span{color:#c090ff;font-size:22px}.welcome-section-nav{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 20px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:18px 0;margin:16px 0 0}.welcome-section-nav button,.welcome-footer button{background:none;border:0;color:#c6b3df;padding:8px 0;font-size:13px}.welcome-section-nav button:hover,.welcome-footer button:hover{color:#e9d9ff}.welcome-section{padding:64px 0;scroll-margin-top:24px}.welcome-section+.welcome-section{border-top:1px solid var(--line)}.welcome-kicker{display:block;color:#b582f4;font-size:11px;letter-spacing:1.4px;text-transform:uppercase;margin-bottom:12px}.welcome-section h2{font-size:30px;line-height:1.2;letter-spacing:-.6px;margin:0 0 28px}.welcome-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;list-style:none;margin:0;padding:0}.welcome-step-number{display:block;color:#b584ff;font-size:13px;margin-bottom:20px}.welcome-steps h3{font-size:17px;line-height:1.4;margin:0 0 10px}.welcome-steps p,.welcome-about>p{font-size:15px;line-height:1.7;color:var(--muted);margin:0}.welcome-faq details{border-bottom:1px solid var(--line)}.welcome-faq details:first-child{border-top:1px solid var(--line)}.welcome-faq summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:20px;cursor:pointer;font-size:16px;font-weight:600;line-height:1.5;padding:20px 0}.welcome-faq summary::-webkit-details-marker{display:none}.welcome-faq summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.welcome-faq summary span{font-size:24px;font-weight:400;color:#b584ff;flex-shrink:0}.welcome-faq details[open] summary span{transform:rotate(45deg)}.welcome-faq details p{color:var(--muted);font-size:14px;line-height:1.8;margin:0;padding:0 30px 22px 0;max-width:720px}.welcome-development{border-left:2px solid #a575ff;padding:4px 0 4px 18px;margin-top:26px}.welcome-development strong{font-size:14px;font-weight:600;color:#d6c0ee}.welcome-development p{font-size:13px;line-height:1.7;margin:8px 0 0;color:var(--muted)}.welcome-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 0 calc(22px + env(safe-area-inset-bottom));border-top:1px solid var(--line);color:var(--muted);font-size:12px}
@media(max-width:760px){body.welcome-mode #main{padding-bottom:0}.welcome-page .welcome-card{min-height:calc(100svh - 30px)}.welcome-section{padding:42px 0}.welcome-section h2{font-size:25px;margin-bottom:24px}.welcome-steps{grid-template-columns:1fr;gap:26px}.welcome-steps li{display:grid;grid-template-columns:30px minmax(0,1fr);column-gap:14px}.welcome-step-number{grid-column:1;grid-row:1/3;margin:2px 0 0}.welcome-steps h3,.welcome-steps p{grid-column:2}.welcome-steps h3{font-size:16px;margin-bottom:7px}.welcome-steps p{font-size:14px}.welcome-faq summary{font-size:15px;padding:18px 0}.welcome-section-nav{gap:6px 16px}.welcome-section-nav button{font-size:12px}}

/* First-visit introduction. */
body.welcome-mode #main{padding:40px 24px;min-height:100dvh}.welcome-card{width:100%;max-width:600px;margin:auto;text-align:center}.welcome-card .auth-brand{justify-content:center;margin-bottom:42px}.welcome-avatars{display:flex;justify-content:center;align-items:center;padding:14px 0 30px}.welcome-avatars .avatar{width:76px;height:76px;margin-left:-10px;border:3px solid #170f28;box-shadow:0 12px 35px #0003;transform:rotate(-8deg)}.welcome-avatars .avatar:first-child{margin-left:0}.welcome-avatars .avatar:nth-child(even){transform:translateY(-10px) rotate(8deg)}.welcome-card h1{font-size:46px;line-height:1.14;letter-spacing:-1.5px;margin:0 0 22px;font-weight:800}.welcome-card h1 span{color:#be90ff}.welcome-copy{max-width:420px;margin:0 auto;color:#c2b2d8;font-size:17px;line-height:1.6}.welcome-features{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:24px 0 36px}.welcome-features span{padding:8px 12px;border-radius:20px;background:#a875ff0e;border:1px solid #a875ff26;font-size:12px;color:#b5a3cc}.welcome-actions{display:flex;flex-direction:column;gap:12px;max-width:380px;margin:auto}.welcome-actions button{min-height:52px;font-size:16px;border-radius:16px}.welcome-actions .secondary{background:transparent;border-color:#624581}
@media(max-width:760px){body.welcome-mode #main{padding:30px 24px;min-height:100dvh;min-height:100svh}.welcome-card{max-width:420px}.welcome-card .auth-brand{font-size:30px;margin-bottom:32px}.welcome-card .auth-brand img{width:48px;height:48px}.welcome-avatars{padding-bottom:24px}.welcome-avatars .avatar{width:64px;height:64px}.welcome-card h1{font-size:36px;letter-spacing:-1px;margin-bottom:18px}.welcome-copy{font-size:15px}.welcome-features{margin:22px 0 30px}.welcome-features span{font-size:11px}}

.dialog-time-line{display:flex;align-items:center;justify-content:flex-end;gap:4px}.dialog-receipt{display:inline-flex;align-items:center;color:#4c9bff;flex-shrink:0}.dialog-receipt svg{width:21px;height:16px;stroke-width:1.8}

/* Keep search and chats at the same heading, nickname and avatar scale. */
:root{--directory-heading-size:30px;--directory-heading-line:1.2;--directory-heading-spacing:-.8px;--directory-avatar-size:64px;--directory-avatar-symbol:32px;--directory-name-size:16px;--directory-name-line:22px}
.people-head h1,.dialogs-view .page-head h1{font-size:var(--directory-heading-size);line-height:var(--directory-heading-line);letter-spacing:var(--directory-heading-spacing)}
.person .avatar,.dialogs-view .dialog-row .avatar{width:var(--directory-avatar-size);height:var(--directory-avatar-size);font-size:var(--directory-avatar-symbol)}
.person .person-identity,.dialogs-view .dialog-copy strong{font-size:var(--directory-name-size);line-height:var(--directory-name-line);font-weight:700}
@media(max-width:760px){
 :root{--directory-heading-size:23px;--directory-heading-line:29px;--directory-heading-spacing:-.6px;--directory-avatar-size:56px;--directory-avatar-symbol:29px;--directory-name-size:17px}
 .person{min-height:78px;padding:10px 0;gap:12px}
 .person .person-identity{margin-bottom:3px}
}

/* Compact welcome: information opens in dialogs instead of page sections. */
body.welcome-mode #main{padding:30px 24px}.welcome-compact .welcome-card{min-height:calc(100svh - 60px);padding:12px 0;max-width:600px}.welcome-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 22px;margin-top:24px}.welcome-links button{border:0;background:transparent;color:var(--muted);font-size:13px;padding:10px 2px}.welcome-links button:hover{color:#d7baff}.welcome-info{width:min(560px,calc(100% - 30px));max-height:85dvh;overscroll-behavior:contain}.welcome-info .modal-head{position:sticky;top:-25px;background:#1b132c;z-index:1;padding:12px 0;margin-top:-12px}.welcome-info .welcome-steps{grid-template-columns:1fr;gap:26px}.welcome-info .welcome-steps li{display:grid;grid-template-columns:30px minmax(0,1fr);column-gap:14px}.welcome-info .welcome-step-number{grid-column:1;grid-row:1/3;margin:2px 0 0}.welcome-info .welcome-steps h3,.welcome-info .welcome-steps p{grid-column:2}.welcome-info .welcome-steps h3{font-size:16px}.welcome-info .welcome-steps p{font-size:14px}.welcome-info .welcome-faq summary{font-size:15px}.welcome-info .welcome-about>p{font-size:14px}
@media(max-width:760px){.welcome-compact .auth-brand{margin-bottom:24px}.welcome-compact .welcome-features{margin:18px 0 24px}.welcome-compact .welcome-links{margin-top:20px}.welcome-compact .welcome-card h1{font-size:34px}.welcome-info .modal-head h2{font-size:20px}}

/* The ribbon mark replaces the o on welcome and authentication screens. */
.auth-brand .anoveyl-wordmark{display:inline-block;font-size:40px;font-weight:800;letter-spacing:-1.4px;line-height:1.25;white-space:nowrap;color:var(--text)}.auth-brand .anoveyl-wordmark .wordmark-o{display:inline-block;width:.8em;height:.83em;margin:0 .015em;vertical-align:-.14em;object-fit:contain;border-radius:0;box-shadow:none}.auth-brand-button:hover .anoveyl-wordmark{color:#dec6ff}
@media(max-width:760px){.auth-brand .anoveyl-wordmark{font-size:38px}}

/* Fit the complete welcome screen in the available browser viewport. */
body.welcome-mode #main{padding:16px 20px}
.welcome-compact .welcome-card{min-height:calc(100svh - 32px);padding:0;justify-content:center}
.welcome-compact .auth-brand{margin-bottom:18px}
.welcome-compact .welcome-avatars{padding:10px 0 20px}
.welcome-compact .welcome-card h1{font-size:clamp(24px,4vw,40px);line-height:1.16;margin-bottom:16px;letter-spacing:-.8px}
.welcome-compact .welcome-card h1 span{white-space:nowrap}
.welcome-compact .welcome-copy{font-size:15px;line-height:1.5}
.welcome-compact .welcome-features{margin:16px 0 20px}
.welcome-compact .welcome-actions{width:100%;margin:0 auto;gap:8px}
.welcome-compact .welcome-actions button{min-height:44px;padding:10px 18px;font-size:15px}
.welcome-compact .welcome-links{margin-top:12px}
@media(max-width:760px){
 body.welcome-mode #main{padding:14px 20px}
 .welcome-compact .welcome-card{min-height:calc(100svh - 28px)}
 .welcome-compact .auth-brand{margin-bottom:12px}
 .welcome-compact .auth-brand .anoveyl-wordmark{font-size:34px}
 .welcome-compact .welcome-avatars{padding:10px 0 16px}
 .welcome-compact .welcome-avatars .avatar{width:52px;height:52px}
 .welcome-compact .welcome-card h1{font-size:clamp(20px,6.1vw,28px);margin-bottom:14px}
 .welcome-compact .welcome-copy{font-size:14px;line-height:1.45}
 .welcome-compact .welcome-features{margin:14px 0 16px;gap:6px}
 .welcome-compact .welcome-features span{padding:6px 9px;font-size:10px}
 .welcome-compact .welcome-links{margin-top:10px;gap:6px 20px}
 .welcome-compact .welcome-links button{font-size:12px;padding:8px 2px}
}
@media(max-width:760px) and (max-height:600px){
 .welcome-compact .auth-brand{margin-bottom:6px}
 .welcome-compact .auth-brand .anoveyl-wordmark{font-size:30px}
 .welcome-compact .welcome-avatars{padding:6px 0 12px}
 .welcome-compact .welcome-avatars .avatar{width:44px;height:44px}
 .welcome-compact .welcome-card h1{margin-bottom:10px}
 .welcome-compact .welcome-copy{font-size:13px;line-height:1.4}
 .welcome-compact .welcome-features{margin:10px 0 12px}
 .welcome-compact .welcome-links{margin-top:6px}
}

/* Give the welcome content room after removing the repeated feature badges. */
.welcome-compact .welcome-copy{margin-bottom:24px}
@media(max-width:760px){
 .welcome-compact .auth-brand .anoveyl-wordmark{font-size:38px}
 .welcome-compact .welcome-avatars .avatar{width:64px;height:64px}
 .welcome-compact .welcome-avatars{padding:10px 0 20px}
 .welcome-compact .welcome-card h1{font-size:clamp(22px,7vw,30px);margin-bottom:18px}
 .welcome-compact .welcome-copy{font-size:15px;line-height:1.5;margin-bottom:24px}
 .welcome-compact .welcome-actions button{min-height:48px;font-size:16px}
 .welcome-compact .welcome-links{margin-top:14px}
 .welcome-compact .welcome-links button{font-size:13px}
}
@media(max-width:760px) and (max-height:600px){
 .welcome-compact .auth-brand .anoveyl-wordmark{font-size:34px}
 .welcome-compact .welcome-avatars .avatar{width:54px;height:54px}
 .welcome-compact .welcome-avatars{padding:8px 0 14px}
 .welcome-compact .welcome-card h1{margin-bottom:12px}
 .welcome-compact .welcome-copy{font-size:14px;line-height:1.4;margin-bottom:18px}
 .welcome-compact .welcome-actions button{min-height:44px;font-size:15px}
 .welcome-compact .welcome-links{margin-top:8px}
}

/* One continuous conversation header with a centered identity. */
body.chat-mode .chat-head{display:grid;grid-template-columns:76px minmax(0,1fr) 76px;align-items:center;gap:8px;flex:0 0 auto;min-height:48px;padding:1px 10px;margin:0 0 8px;background:#251c34;border:1px solid #58416866;border-radius:22px;overflow-anchor:none}
body.chat-mode .chat-head>.icon-btn:first-child,body.chat-mode .chat-head #chat-menu{position:static;background:transparent;border:0;border-radius:0;margin:0;box-shadow:none}
body.chat-mode .chat-head>.icon-btn:first-child{justify-self:start;width:40px;height:44px}
body.chat-mode .chat-head .person-info{min-width:0;text-align:center}
body.chat-mode .chat-head .person-info h3{font-size:17px;line-height:22px;margin:0 0 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.chat-mode .chat-head .status{display:block;font-size:11px;line-height:16px;color:var(--muted);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.chat-mode .chat-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0}
body.chat-mode .chat-head .avatar{width:40px;height:40px;flex:0 0 40px}
body.chat-mode .chat-head #chat-menu{width:28px;height:44px;flex:0 0 28px}
@media(max-width:760px){
 body.chat-mode .chat-head{grid-template-columns:68px minmax(0,1fr) 68px;gap:4px;min-height:48px;padding:1px 8px;border-radius:20px}
 body.chat-mode .chat-head .avatar{width:36px;height:36px;flex-basis:36px}
 body.chat-mode .chat-head .person-info h3{font-size:16px;line-height:21px}
 body.chat-mode .chat-head .status{font-size:10px;line-height:15px}
}

/* The avatar opens the person's profile; no separate overflow button. */
body.chat-mode .chat-head{grid-template-columns:44px minmax(0,1fr) 44px}
body.chat-mode .chat-head #chat-menu.chat-person-menu{display:grid;place-items:center;justify-self:end;width:44px;height:44px;padding:2px;flex:none;border:0;background:transparent;border-radius:50%;cursor:pointer}
body.chat-mode .chat-head #chat-menu.chat-person-menu:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
body.chat-mode .chat-head #chat-menu.chat-person-menu:hover{background:#a875ff14}
.chat-person-profile{display:flex;flex-direction:column;align-items:center;text-align:center;padding:8px 0 18px;gap:8px}
.chat-person-profile .avatar.large{width:112px;height:112px}
.chat-person-profile h3{display:flex;align-items:center;justify-content:center;gap:8px;margin:8px 0 0;font-size:22px;overflow-wrap:anywhere}
.chat-person-profile h3 .age-badge{flex:0 0 32px;width:32px;height:32px;font-size:14px;font-weight:500}
.chat-person-profile p{margin:0;color:var(--muted);font-size:14px}
.chat-person-profile .chat-person-presence{font-size:12px}

/* A continuous Telegram-style composer bar, with photo attachment. */
body.chat-mode .composer,body.chat-mode .composer:has(.attachment-draft:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:end;gap:6px;width:100%;max-width:100%;margin:0;padding:5px 8px calc(5px + env(safe-area-inset-bottom));background:#251c34;border:0;border-top:1px solid #58416855;border-radius:0;box-shadow:none}
body.chat-mode.keyboard-open .composer{padding-bottom:5px}
body.chat-mode .composer-box{border:0;border-radius:0;background:transparent;box-shadow:none;padding:0;overflow:hidden}
body.chat-mode .composer-box #attach{width:36px;height:44px;padding:6px;color:#b8a7cb}
body.chat-mode .composer-box #attach svg{width:25px;height:25px}
body.chat-mode .composer textarea{height:44px;max-height:100px;padding:11px 6px;font-size:16px;line-height:22px;background:transparent}
body.chat-mode .composer textarea::placeholder{color:#a99aba}
body.chat-mode .composer .send-btn{width:44px;height:44px;border:0;border-radius:0;background:transparent;box-shadow:none;color:#c29aff}
body.chat-mode .composer .send-btn svg{width:27px;height:27px}
body.chat-mode .composer .send-btn:active{color:#e2ccff}
body.chat-mode .composer .attachment-draft{margin:3px 0 3px 4px}
@media(max-width:760px){
 body.chat-mode #main{padding:6px 0 0}
 body.chat-mode .chat-head{margin-left:16px;margin-right:16px}
 body.chat-mode .messages{padding-left:10px;padding-right:10px}
}

/* Person menu and report form. */
.person-dialog .modal-head{justify-content:flex-end;margin-bottom:0}
.person-dialog .modal-head h2{display:none}
#close-modal{width:36px;height:36px;padding:0;display:grid;place-items:center;border-radius:50%;outline:none}
#close-modal:focus-visible{outline:none;background:#b890ff1c;color:#eee0ff}
.report-reasons{display:grid;gap:4px;margin:12px 0 20px}
.report-reasons label{display:flex;align-items:center;gap:12px;min-height:44px;cursor:pointer;font-size:14px}
.report-reasons input{width:18px;height:18px;accent-color:#aa75ff}
.report-comment{display:block;font-size:14px}
.report-comment span{color:var(--muted);font-size:12px}
.report-comment textarea{display:block;width:100%;height:auto;min-height:86px;padding:12px;margin-top:8px;resize:vertical;font:inherit}

/* Home Screen installation and iPhone safe areas. */
.install-app{display:none!important}
html.ios-device:not(.installed-app) .install-app{display:flex!important;align-items:center;justify-content:center}
html.ios-device:not(.installed-app) .settings .install-app{justify-content:flex-start}
.install-steps{padding-left:22px;margin:18px 0;color:var(--text);font-size:15px;line-height:1.7}
.install-steps li{padding:5px 0}
@media(display-mode:standalone){
 body:not(.chat-mode){padding-top:env(safe-area-inset-top)}
 body.chat-mode #main{padding-top:calc(6px + env(safe-area-inset-top))}
 .mobile-nav{padding-bottom:calc(8px + env(safe-area-inset-bottom))}
 body.auth-mode #main{min-height:calc(100svh - env(safe-area-inset-top));padding-bottom:calc(20px + env(safe-area-inset-bottom))}
 body.welcome-mode .welcome-compact .welcome-card{min-height:calc(100svh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
 .startup-screen{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
}

/* The app interface does not expose browser text selection. */
body,body *{
 -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
input,textarea,[contenteditable="true"]{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}

/* Shared circular age badge in search and chats. */
.age-badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:#b27bff26;color:#d4b4ff;font-size:12px;font-weight:500;line-height:1;letter-spacing:0}
.person .person-identity,.dialogs-view .dialog-identity{display:flex;align-items:center;gap:8px;min-width:0}
.person .person-identity{margin-bottom:4px}
.person .person-name,.dialogs-view .dialog-identity strong{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dialogs-view .dialog-city{display:block;font-size:12px;line-height:17px;margin-top:3px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dialogs-view .dialog-row{min-height:96px}
.dialogs-view .dialog-copy p{margin-top:4px}
@media(max-width:760px){.dialogs-view .dialog-row{min-height:96px}.person .city-line{font-size:12px;line-height:17px}}

/* City follows the age badge on the chat identity line. */
.dialogs-view .dialog-identity .dialog-city{display:block;flex:0 1 auto;min-width:0;margin:0;font-size:12px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dialogs-view .dialog-row{min-height:78px}
@media(max-width:760px){.dialogs-view .dialog-row{min-height:78px}}

/* Age follows the nickname in the chat header. */
body.chat-mode .chat-head .chat-identity{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0}
body.chat-mode .chat-head .chat-name{min-width:0;flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.chat-mode .chat-head .age-badge{display:inline-flex;flex:0 0 28px}

/* One rounded composer with photo and voice controls. */
body.chat-mode .composer,body.chat-mode .composer:has(.attachment-draft:not([hidden])){
 width:calc(100% - 16px);max-width:calc(100% - 16px);margin:6px 8px max(8px,env(safe-area-inset-bottom));padding:6px 8px;gap:4px;border:0;border-radius:28px;background:#211d2a;box-shadow:0 4px 18px #0002
}
body.chat-mode.keyboard-open .composer,body.chat-mode.keyboard-open .composer:has(.attachment-draft:not([hidden])){margin-bottom:8px;padding-bottom:6px}
body.chat-mode .composer-box #attach{display:grid;place-items:center;width:40px;height:44px;padding:7px;color:#aca4ba;flex-shrink:0}
body.chat-mode .composer-box #attach svg{width:27px;height:27px;stroke-width:1.8}
body.chat-mode .composer textarea{padding-left:7px;color:#f5f1fc}
body.chat-mode .composer textarea::placeholder{color:#a59eaf}
body.chat-mode .composer .send-btn{border-radius:50%;color:#aca4ba}
body.chat-mode .composer .send-btn[aria-label="Отправить сообщение"]{color:#c29aff}
body.chat-mode .composer .attachment-draft{margin:6px 0 4px 7px}

/* Welcome uses the same separate emblem and name as the splash. */
.welcome-brand{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;margin-bottom:18px;flex-shrink:0}
.welcome-brand .welcome-emblem{display:block;width:96px;height:96px;object-fit:contain}
.welcome-brand strong{font-size:44px;font-weight:800;line-height:1.2;letter-spacing:-1.5px;color:var(--text);white-space:nowrap}
@media(max-width:760px){
 .welcome-brand{gap:8px;margin-bottom:12px}
 .welcome-brand .welcome-emblem{width:58px;height:58px}
 .welcome-brand strong{font-size:36px}
}
@media(max-width:760px) and (max-height:600px){
 .welcome-brand{gap:5px;margin-bottom:6px}
 .welcome-brand .welcome-emblem{width:44px;height:44px}
 .welcome-brand strong{font-size:30px}
}
@media(display-mode:standalone) and (min-height:700px){
 .welcome-brand{gap:12px;margin-bottom:16px}
 .welcome-brand .welcome-emblem{width:92px;height:92px}
 .welcome-brand strong{font-size:42px}
}

/* Clean gallery symbol with balanced stroke and optical size. */
body.chat-mode .composer-box #attach svg{width:26px;height:26px;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}

/* Presence on the chat avatar and an incoming typing indicator. */
body.chat-mode .chat-head .avatar i{display:block;width:11px;height:11px;right:-1px;bottom:-1px;border:2px solid #251c34;background:#43ed80;border-radius:50%;box-shadow:none}
body.chat-mode .chat-head .status.peer-typing{color:#c29aff}
.typing-dots{display:inline-flex;align-items:center;gap:2px;margin-left:3px;vertical-align:middle}
.typing-dots i{display:block;width:3px;height:3px;background:currentColor;border-radius:50%;animation:typing-pulse 1.2s ease-in-out infinite}
.typing-dots i:nth-child(2){animation-delay:.15s}.typing-dots i:nth-child(3){animation-delay:.3s}
@keyframes typing-pulse{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-2px)}}
@media(prefers-reduced-motion:reduce){.typing-dots i{animation:none;opacity:1}}

/* Lower the composer by halving its empty bottom inset. */
body.chat-mode .composer,body.chat-mode .composer:has(.attachment-draft:not([hidden])){margin-bottom:max(4px,calc(env(safe-area-inset-bottom) / 2))}
body.chat-mode.keyboard-open .composer,body.chat-mode.keyboard-open .composer:has(.attachment-draft:not([hidden])){margin-bottom:4px}

/* Active presence uses a saturated purple accent. */
body.chat-mode .chat-head .status:not(.off){color:#b469ff;font-weight:500}

/* Approved quiet city wallpaper, only inside conversations. */
body.chat-mode .chat-layout{background-color:#100b20;background-image:url("assets/chat-wallpaper-night-v3.png");background-size:260px 390px;background-position:center top;background-repeat:repeat}

/* Hover is for a mouse; touch rows open on the first completed tap. */
.person,.dialog-row{touch-action:pan-y}
@media(hover:hover) and (pointer:fine){.person:hover{border-color:#775894;background:#a774ff06}.dialog-row:hover{background:#ad8aff05}}

/* Keep bottom navigation interactive after native iOS history gestures. */
#mobile-nav{pointer-events:auto}
#mobile-nav .nav-item{touch-action:manipulation;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
@media(hover:none){#mobile-nav .nav-item:focus:not(:focus-visible){outline:none}}

/* Hide scroll indicators without disabling scrolling. */
html,body,*{scrollbar-width:none;-ms-overflow-style:none}
*::-webkit-scrollbar{display:none;width:0;height:0}
.swipe-return-preview{position:fixed;inset:0;background:#100b20;z-index:1;pointer-events:none;overflow:hidden}
body.swipe-back-active main{position:relative;z-index:2;background:transparent}
body.swipe-back-active .chat-layout{will-change:transform;box-shadow:-8px 0 24px #0004}
body.swipe-back-active .chat-layout,body.swipe-back-active main{overflow-x:clip}

.swipe-return-preview{will-change:transform,filter}

/* Root sections scroll vertically and never pan horizontally. */
body:not(.chat-mode):not(.auth-mode){overflow-x:hidden;overscroll-behavior-x:none}
body:not(.chat-mode):not(.auth-mode) main,body:not(.chat-mode):not(.auth-mode) .mobile-nav{touch-action:pan-y;overscroll-behavior-x:none}

/* Match the reference's single photo frame and heavier microphone. */
body.chat-mode .composer-box #attach svg{width:30px;height:30px;stroke-width:3}
body.chat-mode .composer .send-btn[aria-label="Записать голосовое"] svg{width:30px;height:30px;stroke-width:3}


body.chat-mode .composer-box #attach,body.chat-mode .composer .send-btn[aria-label="Записать голосовое"]{color:#fff}


/* Compact GPT-sized composer with Telegram's bottom clearance. */
@media(max-width:760px){
 body.chat-mode:not(.keyboard-open) .shell{position:fixed;top:0}
 body.chat-mode #main{display:flex;flex-direction:column;height:100%;min-height:0}
 body.chat-mode .chat-layout{flex:1 1 0;height:auto;min-height:0}
 body.chat-mode .chat-head{flex-shrink:0}
 body.chat-mode .composer,body.chat-mode .composer:has(.attachment-draft:not([hidden])){width:82%;max-width:560px;min-height:50px;margin:6px auto calc(env(safe-area-inset-bottom) + 8px);padding:3px 8px;grid-template-columns:minmax(0,1fr) 40px;border-radius:26px;flex-shrink:0}
 body.chat-mode .composer textarea{height:44px;min-height:44px;max-height:44px}
 body.chat-mode .composer-box #attach,body.chat-mode .composer .send-btn{width:40px;height:44px}
 body.chat-mode.keyboard-open .composer,body.chat-mode.keyboard-open .composer:has(.attachment-draft:not([hidden])){margin-bottom:6px;padding:3px 8px}
}

/* Continue the wallpaper through the footer and iPhone home indicator area. */
html.chat-viewport-locked,body.chat-mode{background-color:#100b20;background-image:url("assets/chat-wallpaper-night-v3.png");background-size:260px 390px;background-repeat:repeat;background-position:center 6px}
@media(display-mode:standalone){html.chat-viewport-locked,body.chat-mode{background-position:center calc(6px + env(safe-area-inset-top))}}
body.chat-mode .composer-box #attach svg,body.chat-mode .composer .send-btn[aria-label="Записать голосовое"] svg{width:24px;height:24px;stroke-width:3}

/* One foreground screen above a frozen return screen, independent of nested stacking contexts. */
body.chat-mode .shell{z-index:1}
.swipe-return-preview{z-index:10}
body.swipe-back-active .shell{z-index:20;will-change:transform;background-color:#100b20;background-image:url("assets/chat-wallpaper-night-v3.png");background-size:260px 390px;background-repeat:repeat;background-position:center 6px;box-shadow:-8px 0 24px #0004}
body.swipe-back-active main{z-index:auto}
body.swipe-back-active .chat-layout{box-shadow:none;will-change:auto}
body.chat-mode::before{content:"";position:fixed;top:0;left:0;right:0;height:100vh;height:calc(100lvh + env(safe-area-inset-bottom));z-index:0;pointer-events:none;background:#100b20 url("assets/chat-wallpaper-night-v3.png") center 6px / 260px 390px repeat}
@media(display-mode:standalone){body.chat-mode::before,body.swipe-back-active .shell{background-position:center calc(6px + env(safe-area-inset-top))}}

/* The root canvas and return preview use the same flat background. */
html:not(.chat-viewport-locked){background:#100b20}
body:not(.chat-mode) main,.swipe-return-preview{background:#100b20}

/* The screen canvas includes the PWA's lower safe area; the keyboard only resizes chat content. */
@media(max-width:760px){
 html.chat-viewport-locked,body.chat-mode{height:var(--app-canvas-height,100lvh);min-height:var(--app-canvas-height,100lvh)}
 body.chat-mode::before{height:var(--app-canvas-height,100lvh)}
 body.swipe-back-active .shell{overflow:visible}
 body.swipe-back-active .shell::after{content:"";position:absolute;top:100%;left:0;right:0;height:max(0px,calc(var(--app-canvas-height,100lvh) - var(--chat-viewport-height,100dvh)));pointer-events:none;background:#100b20 url("assets/chat-wallpaper-night-v3.png") center calc(6px - var(--chat-viewport-height,100dvh)) / 260px 390px repeat}
}
@media(display-mode:standalone){body.swipe-back-active .shell::after{background-position:center calc(6px + env(safe-area-inset-top) - var(--chat-viewport-height,100dvh))}}

/* Photo viewing uses the same unified header as the conversation. */
.photo-viewer-head{grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;min-height:48px;margin:calc(env(safe-area-inset-top) + 8px) 16px 8px;padding:1px 10px;background:#251c34;border:1px solid #58416866;border-radius:22px}
.photo-viewer-head #close-photo{background:transparent;border:0;border-radius:12px;width:44px;height:44px}
.photo-viewer-identity{background:transparent;border:0;border-radius:0;padding:0;max-width:100%;line-height:1.35}
.photo-viewer-identity strong{font-size:17px;font-weight:700}
.photo-viewer-identity span{color:#9e90b7;font-size:13px}
.photo-viewer-stage img,.message.photo-message img{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}
@media(max-width:760px){.photo-viewer-head{gap:4px;min-height:48px;padding:1px 8px;border-radius:20px}}

/* Hold actions, replies and multi-message selection. */
.message{position:relative;-webkit-touch-callout:none}
.message .bubble{-webkit-user-select:none;user-select:none}
.message.selected .bubble{box-shadow:0 0 0 2px #c391ff}
.message.selected::before{content:'✓';position:absolute;left:-26px;top:50%;transform:translateY(-50%);width:21px;height:21px;display:grid;place-items:center;background:#a66aff;color:#fff;border-radius:50%;font-size:13px}
.message-reply{display:flex;flex-direction:column;border-left:3px solid #c49aff;background:#ffffff0b;border-radius:4px;padding:5px 8px;margin:0 0 6px;max-width:100%;font-size:12px;line-height:1.4;overflow:hidden}
.message-reply strong{color:#d5b4ff;font-size:12px}
.message-reply span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;color:#e1d8ed}
.photo-message .message-reply{margin:6px 7px}
.reply-draft{grid-column:1/-1;display:flex;align-items:center;gap:8px;min-width:0;margin:5px 5px 0}
.reply-draft[hidden]{display:none}
.reply-draft .message-reply{flex:1;min-width:0;margin:0}
.reply-draft>button{border:0;background:transparent;color:#b9a5d1;font-size:24px;padding:2px 6px}
body.chat-mode .composer.selecting{display:none}
.message-selection-bar{flex-shrink:0;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 16px calc(env(safe-area-inset-bottom) + 12px);background:#251c34;border-radius:20px 20px 0 0;font-size:13px}
.message-selection-bar button{border:0;background:transparent;color:#c69aff;padding:7px}
.message-selection-bar>span{color:#e9e0f5}
dialog.message-context{position:fixed;inset:auto;left:var(--context-left,16px);top:var(--context-top,100px);margin:0;padding:5px;width:min(250px,calc(100vw - 32px));max-width:none;background:#251c34;border:1px solid #584168;border-radius:20px;box-shadow:0 12px 40px #0008;color:#f5f1fc;overflow:hidden}
dialog.message-context::backdrop{background:#08051099;backdrop-filter:blur(4px)}
.message-context-actions button{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:10px 16px;background:transparent;border:0;text-align:left;font-size:15px;color:#f5f1fc}
.message-context-actions button:focus:not(:focus-visible){outline:none}
.message-context-actions button:last-child{border-top:1px solid #ffffff12}
.message-context-actions .danger{color:#f47b89}
.message-delete .delete-message-actions{display:flex;flex-direction:column;gap:3px}
.delete-message-actions button{border:0;background:transparent;text-align:left;padding:13px 9px;font-size:15px;color:#f47b89}
.delete-message-actions #cancel-delete{color:#c8b6dd;border-top:1px solid #ffffff12}
.delete-prototype-note{font-size:11px;line-height:1.5;color:#9e90b7;margin:10px 9px}
.photo-viewer-bottom-space{flex:0 0 calc(env(safe-area-inset-bottom) + 12px)}

@keyframes photo-viewer-appear{from{opacity:.3}to{opacity:1}}

.message-reply[role=button]{cursor:pointer}
.message-reply[role=button]:focus-visible{outline:2px solid #c391ff;outline-offset:2px}
.message{touch-action:pan-y}
.swipe-reply-indicator{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#38254d;color:#cda6ff;opacity:0;pointer-events:none;transition:background 120ms ease}
.swipe-reply-indicator svg{width:18px;height:18px;fill:currentColor;stroke:none}
.reply-swipe-ready .swipe-reply-indicator{background:#8b4be1;color:#fff}
.message.reply-target .bubble{animation:reply-target-flash 1.5s ease}
@keyframes reply-target-flash{0%,20%{box-shadow:0 0 0 3px #c391ff,0 0 22px #a36bff55}100%{box-shadow:0 0 0 0 transparent}}
@media(prefers-reduced-motion:reduce){.message.reply-target .bubble{animation:none;outline:2px solid #c391ff}.swipe-reply-indicator{transition:none}}

.photo-placeholder{display:grid;place-items:center;width:100%;min-height:130px;padding:18px 14px;text-align:center;color:#b6a4cd;background:#23192f;font-size:12px;line-height:1.5;cursor:pointer}

/* The conversation header follows the composer's horizontal footprint. */
@media(max-width:760px){body.chat-mode .chat-head{width:82%;max-width:560px;margin-left:auto;margin-right:auto}.photo-viewer-head{width:82%;max-width:560px;margin-left:auto;margin-right:auto}}
.notification-toggle svg{fill:currentColor;stroke-width:1.6}

/* Photo unfolds from the message and returns there on dismissal. */
dialog.photo-viewer,dialog.photo-viewer::backdrop{background:transparent}
.photo-viewer-shade{position:absolute;inset:0;z-index:0;background:#000;opacity:var(--photo-shade-opacity,1);pointer-events:none}
.photo-viewer-head,.photo-viewer-caption,.photo-viewer-bottom-space{z-index:2;opacity:var(--photo-chrome-opacity,1);transition:opacity 180ms ease}
.photo-viewer-caption,.photo-viewer-bottom-space{position:relative}
.photo-viewer-stage{position:relative;z-index:1;overflow:visible;touch-action:none}
.photo-viewer-stage img{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;transform-origin:center;will-change:transform;opacity:0;touch-action:none}
.photo-viewer-settling .photo-viewer-shade{transition:opacity 260ms ease}
.photo-controls-hidden .photo-viewer-head,.photo-controls-hidden .photo-viewer-caption{pointer-events:none}
@media(prefers-reduced-motion:reduce){.photo-viewer-head,.photo-viewer-caption,.photo-viewer-bottom-space,.photo-viewer-settling .photo-viewer-shade{transition:none}}

/* Age badges keep their established shape and indicate the profile's sex. */
.age-badge.age-male{background:#438fee26;color:#83baff}
.age-badge.age-female{background:#ec6eae26;color:#f4a0ca}

#mobile-nav{z-index:30;isolation:isolate;touch-action:none}
#mobile-nav .nav-item{touch-action:none}

/* Lift the held message above the blurred chat, then unfold its actions. */
dialog.message-context{inset:0;left:0;top:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:hidden}
dialog.message-context::backdrop{background:transparent;backdrop-filter:none}
.message-context-shade{position:absolute;inset:0;background:#080510a8;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.message-context-actions{position:absolute;z-index:2;padding:5px;background:#251c34;border:1px solid #584168;border-radius:20px;box-shadow:0 12px 40px #0008;overflow:hidden}
.message-context-preview{position:absolute;z-index:1;margin:0;pointer-events:none;min-width:0;filter:drop-shadow(0 8px 18px #0004)}
.message-context-preview .bubble{visibility:visible!important;transform:none!important;width:100%;height:100%}

.message-context-preview{pointer-events:auto}
.message-context-preview .context-selectable,.message-context-preview .context-selectable *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default;cursor:text}
.message-context-preview img,.message-context-preview audio,.message-context-preview .message-time,.message-context-preview .reply-quote{pointer-events:none;-webkit-user-select:none;user-select:none}
.message-context-preview .context-selectable::selection,.message-context-preview .context-selectable *::selection{background:#a57bff77}

.message-context-shade{background:#08051080;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.message-context-preview:focus{outline:none}
.message-context-preview,.message-context-actions{will-change:transform,opacity}

/* GPT-style send control; the empty composer continues to show its mic. */
body.chat-mode .composer .send-btn[aria-label="Отправить сообщение"]{width:36px;height:36px;min-width:36px;padding:0;justify-self:center;align-self:center;border:0;border-radius:50%;background:#302c37;color:#fff;box-shadow:none}
body.chat-mode .composer .send-btn[aria-label="Отправить сообщение"] svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
body.chat-mode .composer .send-btn[aria-label="Отправить сообщение"]:active{background:#3a3542;color:#fff}

/* Matching quiet circles for attachment and voice, inside the composer. */
body.chat-mode .composer-box #attach,body.chat-mode .composer .send-btn[aria-label="Записать голосовое"]{width:36px;height:36px;min-width:36px;flex:0 0 36px;padding:0;align-self:center;justify-self:center;display:grid;place-items:center;border:0;border-radius:50%;background:#302c37;color:#fff;box-shadow:none}
body.chat-mode .composer-box #attach svg,body.chat-mode .composer .send-btn[aria-label="Записать голосовое"] svg{width:22px;height:22px}
body.chat-mode .composer-box #attach:active,body.chat-mode .composer .send-btn[aria-label="Записать голосовое"]:active{background:#3a3542;color:#fff}

/* Floating bars cover the full-height history instead of clipping its edges. */
@media(max-width:760px){
 body.chat-mode .chat-layout{position:relative;display:block}
 body.chat-mode .messages{position:absolute;inset:0;width:100%;height:100%;z-index:0;padding-top:var(--chat-history-top,56px);padding-bottom:var(--chat-history-bottom,calc(64px + env(safe-area-inset-bottom)));scroll-padding-top:var(--chat-history-top,56px);scroll-padding-bottom:var(--chat-history-bottom,calc(64px + env(safe-area-inset-bottom)))}
 body.chat-mode .chat-head{position:absolute;top:0;left:9%;z-index:2;margin:0;width:82%}
 body.chat-mode .composer,body.chat-mode .composer:has(.attachment-draft:not([hidden])){position:absolute;left:9%;bottom:calc(env(safe-area-inset-bottom) + 8px);z-index:2;width:82%;margin:0}
 body.chat-mode.keyboard-open .composer,body.chat-mode.keyboard-open .composer:has(.attachment-draft:not([hidden])){bottom:6px;margin:0}
 body.chat-mode .message-selection-bar{position:absolute;left:0;right:0;bottom:0;z-index:2}
}

/* History reaches the screen edges, beneath the translucent floating bars. */
@media(max-width:760px){
 body.chat-mode #main{padding:0}
 body.chat-mode .chat-head{top:6px;background:rgba(37,28,52,.84);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
 body.chat-mode .composer,body.chat-mode .composer:has(.attachment-draft:not([hidden])){background:rgba(33,29,42,.84);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
}
@media(max-width:760px) and (display-mode:standalone){
 body.chat-mode .chat-head{top:calc(6px + env(safe-area-inset-top))}
}

/* Fade the entire edge region, including the gaps beside the floating bars. */
.results-label:not([hidden]){display:block;margin:12px 0 4px;font-size:13px;line-height:18px;color:var(--muted)}
.filters .random-peer-btn{width:44px;height:44px;padding:0;flex:0 0 44px}
@media(max-width:760px){.filters{grid-template-columns:minmax(0,1fr) 44px 44px}.filters .random-peer-btn{grid-column:3;grid-row:1}}
@media(max-width:760px){
 body.chat-mode .chat-layout::before,body.chat-mode .chat-layout::after{content:'';position:absolute;left:0;right:0;z-index:1;pointer-events:none;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
 body.chat-mode .chat-layout::before{top:0;height:calc(var(--chat-history-top,100px) + 16px);background:linear-gradient(to bottom,rgba(16,11,32,.88),rgba(16,11,32,.64) 65%,rgba(16,11,32,0));mask-image:linear-gradient(to bottom,#000 65%,transparent);-webkit-mask-image:linear-gradient(to bottom,#000 65%,transparent)}
 body.chat-mode .chat-layout::after{bottom:0;height:calc(var(--chat-history-bottom,100px) + 16px);background:linear-gradient(to top,rgba(16,11,32,.88),rgba(16,11,32,.64) 65%,rgba(16,11,32,0));mask-image:linear-gradient(to top,#000 65%,transparent);-webkit-mask-image:linear-gradient(to top,#000 65%,transparent)}
}
.support-history{max-height:45svh;overflow:auto;margin-bottom:16px;overscroll-behavior:contain}.support-bubble{padding:14px;border-radius:18px;background:#30213e;margin:10px 0}.support-bubble.own{background:#442567}.support-bubble b,.support-bubble small{display:block}.support-bubble p{white-space:pre-wrap;overflow-wrap:anywhere}.support-bubble time,.support-bubble small{font-size:12px;color:#c6b2d9}#support-send textarea{margin:10px 0}
.support-avatar{display:grid;place-items:center;background:#39294d}.support-avatar svg{width:28px;height:28px;stroke:#c8a1ff}.support-case-card{align-self:center;display:flex;flex-direction:column;gap:4px;max-width:85%;padding:10px 16px;margin:12px auto;border-radius:16px;background:rgba(35,25,48,.85);color:#c3afd7;text-align:center;font-size:13px}.support-staff-label{display:block;margin-bottom:5px;color:#c79bff;font-weight:600}.support-chat-layout .message-content{white-space:pre-wrap;overflow-wrap:anywhere}.support-older{align-self:center;margin:12px auto}.support-chat-layout #support-attach{width:36px;height:36px;flex:0 0 36px;border:0;border-radius:50%;background:#302c37;color:#fff;padding:7px}.support-chat-layout #support-attach svg{width:22px;height:22px}

/* Compact support entry beside the chats heading. */
.dialogs-view .page-head{align-items:center;justify-content:space-between}
.dialogs-view .support-button{position:relative;flex-shrink:0;width:44px;height:44px;border:1px solid #70508c66;border-radius:14px;background:#241932;color:#cbb3e4;display:grid;place-items:center;cursor:pointer}
.support-button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.support-button:hover{background:#31203f;color:#e7d5ff}
.support-button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.support-unread-dot{position:absolute;right:4px;top:4px;width:8px;height:8px;border-radius:50%;background:#ac65ff;box-shadow:0 0 0 2px var(--bg)}
.support-unread-dot[hidden]{display:none}

/* Keep timestamp clearance identical to the rendered delivery receipt. */
.message .bubble .message-time,.message-time-space{display:inline-flex;align-items:center;gap:4px}
.message-receipt{display:inline-flex;flex-shrink:0}
.message-receipt svg{width:18px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Telegram-style receipt: one complete check and the trailing stroke of the second. */
.message .bubble .message-time,.message-time-space{gap:2px}
.message-receipt svg{width:16px;height:12px;stroke-width:1.45}

/* The chat list uses the same check geometry and size as message bubbles. */
.dialog-receipt svg{width:16px;height:12px;stroke-width:1.45}

.nav-item{position:relative}
.nav-chat-count{position:absolute;top:5px;right:8px;min-width:17px;height:17px;padding:0 4px;display:grid;place-items:center;background:#a96aff;color:#fff;border:2px solid var(--bg);border-radius:12px;font-size:10px;font-weight:700;line-height:1}
.nav-chat-count[hidden]{display:none}
.sidebar .nav-chat-count{top:50%;right:12px;transform:translateY(-50%)}

/* Active tab color is sufficient; the legacy underline must not move above the icon. */
.mobile-nav .nav-item.active::after{content:none;display:none}

/* Visible on the welcome and sign-in/registration screens. */
.development-notice{padding:10px 14px;margin:0 0 20px;border:1px solid #a575ff66;border-radius:12px;background:#a575ff14;color:#dfcaff;font-size:13px;line-height:1.5;text-align:center;overflow-wrap:anywhere}
.welcome-info .welcome-development{margin-top:0}
