:root{--bg:#f6f6f1;--surface:#fff;--ink:#262d26;--muted:#777f76;--line:#e2e6de;--green:#526a40;--green-soft:#eaf0e4;--danger:#a04746;--radius:18px;--safe-bottom:env(safe-area-inset-bottom,0px);color-scheme:light}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:15px;line-height:1.5}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.5}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #95ad7f;outline-offset:3px}[hidden]{display:none!important}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.symbols{position:absolute;width:0;height:0;overflow:hidden}h1,h2,h3,p{margin-top:0}h1{font-size:30px;font-weight:650;letter-spacing:-1px;margin-bottom:0}h2{font-size:21px;letter-spacing:-.5px;font-weight:650}small,.muted{color:var(--muted)}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:650;color:var(--muted);margin-bottom:8px}.brandmark{display:inline-grid;place-items:center;width:44px;height:44px;background:var(--green);color:white;border-radius:14px;font-family:Georgia,serif;font-size:29px;letter-spacing:-3px;padding-right:3px}.shell{max-width:1260px;margin:auto;display:grid;grid-template-columns:210px minmax(0,1fr);min-height:100dvh}.navigation{padding:35px 20px;border-right:1px solid var(--line);display:flex;flex-direction:column;height:100dvh;position:sticky;top:0}.wordmark{display:flex;align-items:center;gap:12px;font-weight:650;font-size:16px}.wordmark small{display:block;font-size:10px;font-weight:500;letter-spacing:2px;margin-top:2px}.navigation nav{display:grid;gap:8px;margin-top:60px}.navigation nav a{display:flex;gap:13px;align-items:center;border-radius:12px;padding:13px 14px;color:var(--muted);font-size:14px}.navigation nav a.active{color:var(--green);background:var(--green-soft);font-weight:650}.navigation b{font-size:10px;border-radius:10px;padding:2px 6px;background:var(--green);color:white;margin-left:auto}.nav-note{margin-top:auto;color:var(--muted);font-size:12px;line-height:1.8;padding:15px}.view{padding:38px 44px}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px;gap:12px}.primary,.secondary,.text-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:12px;padding:12px 18px;font-weight:600;min-height:44px}.primary{color:white;background:var(--green)}.secondary{background:var(--surface);border:1px solid var(--line);color:var(--ink)}.text-button{background:none;color:var(--green)}.compact{padding:8px 13px;font-size:13px}.icon-button{display:inline-grid;place-items:center;width:44px;height:44px;border:0;border-radius:50%;background:var(--surface);color:var(--ink);flex-shrink:0}.discover-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:24px;font-size:13px;flex-wrap:wrap}.discover-toolbar label{color:var(--muted)}select{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:10px;padding:9px 28px 9px 12px;font-size:13px;max-width:100%}.discover-toolbar .muted{margin-left:auto}#discover-content{max-width:450px;margin:auto}.profile-card{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);overflow:hidden}.portrait{position:relative;aspect-ratio:4/4.3;background:var(--green-soft);overflow:hidden;display:grid;place-items:center}.portrait>img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}.portrait .fallback{color:var(--green);display:grid;place-items:center;text-align:center;font-size:12px;gap:10px}.portrait .fallback svg{width:60px;height:60px;stroke-width:1}.portrait-gradient{position:absolute;inset:50% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.72));pointer-events:none}.portrait-info{position:absolute;bottom:20px;left:22px;right:22px;color:white;pointer-events:none}.portrait-info h2{font-size:28px;line-height:1.2;margin-bottom:8px}.portrait-info p{display:flex;align-items:center;gap:6px;font-size:12px;margin-bottom:0}.portrait-info svg{width:15px;height:15px}.photo-counter{position:absolute;top:14px;right:14px;background:rgba(0,0,0,.4);border-radius:20px;color:#fff;padding:4px 10px;font-size:11px}.photo-arrow{position:absolute;top:40%;background:rgba(255,255,255,.85);width:32px;height:44px;border-radius:8px}.photo-arrow.prev{left:10px}.photo-arrow.next{right:10px}.photo-arrow svg{width:17px}.profile-body{padding:18px 22px}.profile-bio{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6;margin-bottom:16px}.profile-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:var(--muted)}.profile-actions{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:20px}.profile-actions .icon-button{width:56px;height:56px;border:1px solid var(--line);box-shadow:0 4px 10px #00000003}.profile-actions .like{width:66px;height:66px;background:var(--green);color:white;border:0}.profile-actions .like svg{width:26px;height:26px}.action-labels{display:flex;justify-content:center;gap:35px;font-size:10px;color:var(--muted);margin-top:8px}.empty{text-align:center;padding:60px 20px;color:var(--muted)}.empty>svg{width:44px;height:44px;margin-bottom:15px;color:var(--green)}.empty h2{color:var(--ink);margin-bottom:10px}.empty p{max-width:330px;margin:0 auto 20px;font-size:14px}.spinner{width:25px;height:25px;border:2px solid var(--line);border-top-color:var(--green);border-radius:50%;display:inline-block;animation:spin .8s linear infinite}.busy{padding:60px 20px;text-align:center}@keyframes spin{to{transform:rotate(360deg)}}.gate{min-height:100dvh;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:30px;text-align:center;gap:16px}.gate p{max-width:400px;color:var(--muted)}.gate h1{font-size:25px}.chat-view{padding:0;display:grid;grid-template-columns:300px minmax(0,1fr);height:100dvh;overflow:hidden}.chat-list-panel{border-right:1px solid var(--line);overflow-y:auto;padding:34px 14px 20px}.chat-list-panel .page-heading{padding:0 12px;margin-bottom:18px}.chat-list-panel h1{font-size:25px}.search{display:block;padding:0 5px 15px}.search input{width:100%;border:1px solid var(--line);border-radius:12px;padding:11px 13px;background:var(--surface);font-size:13px;color:var(--ink)}.chat-row{display:flex;align-items:center;gap:11px;width:100%;padding:14px 10px;border:0;background:none;text-align:left;border-radius:12px;color:var(--ink)}.chat-row:hover,.chat-row.active{background:var(--green-soft)}.avatar{position:relative;width:43px;height:43px;border-radius:50%;background:var(--green-soft);flex-shrink:0;display:grid;place-items:center;font-size:18px;color:var(--green);overflow:hidden}.avatar-fallback{display:grid;place-items:center;width:100%;height:100%;line-height:1}.avatar img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}.chat-summary{min-width:0;flex:1}.chat-summary strong{display:block;font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-summary p{color:var(--muted);font-size:12px;margin:3px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-time{font-size:10px;color:var(--muted);align-self:flex-start;margin-top:4px}.unread{display:block;text-align:center;min-width:18px;border-radius:10px;background:var(--green);color:white;font-size:10px;padding:2px 5px;margin-top:9px}.conversation{height:100%;display:flex;flex-direction:column;min-width:0;background:var(--surface)}.conversation>.empty{margin:auto}.conversation-header{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:20px;flex-shrink:0;min-height:88px}.conversation-header h2{font-size:16px;margin:0}.conversation-header p{font-size:11px;color:var(--muted);margin:3px 0 0}.conversation-header .icon-button{border:1px solid var(--line)}.conversation-header .view-person{margin-left:auto}.mobile-back{display:none}.messages{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:20px;background:var(--bg);display:flex;flex-direction:column;gap:8px;min-height:0}.message{align-self:flex-start;max-width:85%;padding:10px 13px;background:var(--surface);border-radius:15px 15px 15px 3px;border:1px solid var(--line);overflow-wrap:anywhere}.message.mine{align-self:flex-end;border-radius:15px 15px 3px 15px;background:var(--green-soft);border-color:var(--green-soft)}.message p{white-space:pre-wrap;line-height:1.5;margin:0;font-size:14px}.message time{display:block;text-align:right;color:var(--muted);font-size:10px;margin-top:3px}.message img,.message video{display:block;max-width:100%;max-height:360px;border-radius:8px;margin-bottom:7px}.message audio{max-width:100%;width:240px}.message .sticker{max-width:150px}.day-label{text-align:center;color:var(--muted);font-size:10px;margin:12px 0}.composer{display:flex;align-items:flex-end;gap:8px;padding:14px;border-top:1px solid var(--line);background:var(--surface)}.composer textarea{width:100%;resize:none;min-height:44px;max-height:130px;padding:11px 12px;border:1px solid var(--line);border-radius:13px;background:var(--bg);color:var(--ink);line-height:1.35;font-size:14px}.composer .send{background:var(--green);color:white}.attachment-strip{font-size:12px;padding:8px 18px;display:flex;gap:10px;align-items:center;border-top:1px solid var(--line)}.attachment-strip button{margin-left:auto}.own-profile{max-width:650px}.own-summary{display:flex;gap:20px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:24px;margin-bottom:20px}.own-avatar{width:85px;height:100px;border-radius:12px;object-fit:cover;background:var(--green-soft)}.own-summary h2{margin-bottom:4px}.own-summary p{font-size:13px;color:var(--muted);margin-bottom:10px}.own-summary .secondary{padding:8px 12px;min-height:36px;font-size:12px}.stats{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:20px 0}.stat{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:15px;font-size:12px;color:var(--muted)}.stat strong{display:block;font-size:24px;color:var(--ink);font-weight:600}.settings{border:1px solid var(--line);border-radius:16px;background:var(--surface);padding:5px 18px}.setting{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 0;border-bottom:1px solid var(--line);font-size:14px}.setting:last-child{border-bottom:0}.setting small{display:block;font-size:11px;margin-top:3px}.setting input[type=checkbox]{width:20px;height:20px;accent-color:var(--green)}.profile-form{max-width:550px;display:grid;gap:16px}.profile-form h2{margin-bottom:0}.profile-form label{display:grid;gap:6px;font-size:13px;font-weight:550}.profile-form input:not([type=checkbox]),.profile-form textarea,.profile-form select{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:10px;padding:12px;font-size:14px;width:100%;font-weight:400}.profile-form textarea{resize:vertical;min-height:110px}.form-row{display:grid;grid-template-columns:2fr 1fr;gap:14px}.photo-editor{display:flex;gap:10px;flex-wrap:wrap}.photo-slot{position:relative;width:92px;height:108px;background:var(--green-soft);border-radius:10px;overflow:hidden}.photo-slot img{width:100%;height:100%;object-fit:cover}.photo-slot button{position:absolute;right:4px;top:4px;width:25px;height:25px;font-size:16px;border:0;border-radius:50%;background:white;color:#333}.photo-add{width:92px;height:108px;background:var(--surface);border:1px dashed #a3af98;border-radius:10px;font-size:25px;color:var(--green)}.profile-form .check-label{display:flex;align-items:flex-start;gap:10px;font-weight:400}.form-actions{display:flex;gap:10px;flex-wrap:wrap}dialog{border:1px solid var(--line);border-radius:20px;background:var(--bg);color:var(--ink);padding:30px 22px;max-width:520px;width:calc(100% - 30px);max-height:90dvh;overflow:auto}dialog::backdrop{background:#111a1199}.modal-close{position:absolute;top:10px;right:10px;z-index:2;width:34px;height:34px}.modal-close svg{width:17px}#modal-content{padding-top:20px}.toast{position:fixed;bottom:calc(24px + var(--safe-bottom));left:50%;transform:translateX(-50%);background:var(--ink);color:var(--surface);border-radius:13px;padding:12px 18px;max-width:90%;width:max-content;z-index:20;font-size:13px;box-shadow:0 6px 25px #0002}.match-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.match-grid button{text-align:left;padding:0;background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden;color:var(--ink)}.match-grid img{width:100%;height:140px;object-fit:cover}.match-grid strong{display:block;padding:10px;font-size:13px}.error-note{color:var(--danger);font-size:12px}.video-preview{max-width:100%;max-height:260px;border-radius:10px;margin:12px 0}
@media(min-width:1100px){.view:not(.chat-view){padding:42px 64px}.chat-view{grid-template-columns:330px minmax(0,1fr)}}
@media(max-width:800px){.shell{grid-template-columns:1fr;padding-bottom:calc(68px + var(--safe-bottom))}.navigation{position:fixed;inset:auto 0 0;height:auto;padding:0;background:var(--surface);border-top:1px solid var(--line);border-right:0;z-index:10;padding-bottom:var(--safe-bottom)}.navigation .wordmark,.nav-note{display:none}.navigation nav{display:flex;margin:0;gap:0;justify-content:space-around}.navigation nav a{flex:1;flex-direction:column;gap:3px;padding:10px 4px 8px;border-radius:0;font-size:10px;position:relative;background:none}.navigation nav a.active{background:none}.navigation nav a svg{width:23px;height:23px}.navigation b{position:absolute;top:5px;left:calc(50% + 10px)}.view{padding:24px 18px}.page-heading{margin-bottom:20px}h1{font-size:27px}.discover-toolbar{gap:8px;margin-bottom:17px}.discover-toolbar .muted{width:100%;margin-left:0;font-size:11px}#discover-content{max-width:450px}.portrait{aspect-ratio:4/4.4;max-height:56dvh}.profile-body{padding:15px 18px}.profile-actions{margin-top:15px}.profile-actions .icon-button{width:50px;height:50px}.profile-actions .like{width:59px;height:59px}.profile-bio{font-size:13px;margin-bottom:10px}.chat-view{height:calc(var(--app-height,100dvh) - 68px - var(--safe-bottom));display:block;padding:0}.chat-list-panel{height:100%;border:0;padding:25px 12px}.conversation{display:none}.chat-view.chat-open .chat-list-panel{display:none}.chat-view.chat-open .conversation{display:flex}.conversation-header{padding:12px;min-height:70px}.mobile-back{display:inline-grid}.conversation-header .avatar{width:36px;height:36px}.conversation-header .view-person{font-size:11px;padding:6px 9px;min-height:32px}.messages{padding:14px 12px}.composer{padding:10px}.composer .icon-button{width:39px;height:42px}.own-summary{padding:18px;gap:16px}.own-avatar{width:70px;height:85px}.own-summary h2{font-size:20px}.toast{bottom:calc(82px + var(--safe-bottom))}dialog{padding:25px 18px}.portrait-info h2{font-size:26px}.profile-form{gap:14px}.setting{font-size:13px}.gate h1{font-size:25px}.form-row{grid-template-columns:1.7fr 1fr}}
/* Диалоги занимают видимую область, включая изменение высоты при открытии клавиатуры. */
html,body{min-width:0;max-width:100%;overflow-x:clip}
#main,.chat-list-panel{min-width:0;min-height:0}
.shell{max-width:1560px;grid-template-columns:190px minmax(0,1fr)}
.chat-view{height:var(--app-height,100dvh);grid-template-columns:280px minmax(0,1fr);min-height:0}
.conversation{min-height:0;overflow:hidden}
.chat-active .shell{position:fixed;top:var(--viewport-top,0px);left:0;right:0;height:var(--app-height,100dvh);min-height:0;overflow:hidden}
.chat-active #main,.chat-active .chat-view{height:100%;min-height:0}
.chat-active .navigation{height:100%}
.conversation-person{flex:1;min-width:0}
.conversation-person h2,.conversation-person p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conversation-header .view-person{flex-shrink:0;margin-left:0}
.message{flex-shrink:0;min-width:0;max-width:min(85%,560px)}
.message img,.message video{object-fit:contain;max-height:min(360px,45dvh)}
.message-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:4px}
.message-footer time{margin:0;white-space:nowrap}
.reply-button{min-height:32px;padding:2px 0;font-size:11px;font-weight:500}
.message-quote{display:flex;flex-direction:column;gap:2px;border:0;border-left:3px solid var(--green);border-radius:4px;padding:6px 9px;margin:0 0 8px;background:var(--bg);color:var(--ink);text-align:left;max-width:100%;width:100%;font-size:12px;overflow:hidden}
.message-quote strong,.message-quote span{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.message-highlight{outline:2px solid var(--green);outline-offset:2px}
.reply-strip{display:flex;align-items:center;gap:12px;flex-shrink:0;border-top:1px solid var(--line);padding:8px 16px;background:var(--surface)}
.reply-strip>div{flex:1;min-width:0;border-left:3px solid var(--green);padding-left:10px;font-size:12px}
.reply-strip strong,.reply-strip span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reply-strip span{color:var(--muted)}
.composer{flex-shrink:0;padding-bottom:max(12px,var(--safe-bottom))}
.composer textarea{flex:1;min-width:0;width:0;font-size:16px;max-height:min(130px,25dvh)}
.attachment-strip{flex-shrink:0}
.attachment-strip>span{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.attachment-strip button{flex-shrink:0}
.own-summary>div{min-width:0}.own-summary h2,.own-summary p{overflow-wrap:anywhere}
.profile-form,.form-row>*{min-width:0}
.profile-meta{flex-wrap:wrap}
@media(min-width:1100px){.navigation{padding:30px 14px}.chat-list-panel{padding:28px 12px}}
@media(max-width:1099px){
  .shell{grid-template-columns:1fr;padding-bottom:calc(68px + var(--safe-bottom))}
  .navigation{position:fixed;inset:auto 0 0;height:auto;padding:0 0 var(--safe-bottom);background:var(--surface);border-top:1px solid var(--line);border-right:0;z-index:10}
  .navigation .wordmark,.nav-note{display:none}.navigation nav{display:flex;margin:0;gap:0;justify-content:space-around}
  .navigation nav a{flex:1;flex-direction:column;gap:3px;padding:10px 4px 8px;border-radius:0;font-size:10px;position:relative;background:none}
  .navigation nav a.active{background:none}.navigation nav a svg{width:23px;height:23px}.navigation b{position:absolute;top:5px;left:calc(50% + 10px)}
  .chat-view{height:calc(var(--app-height,100dvh) - 68px - var(--safe-bottom));grid-template-columns:250px minmax(0,1fr);padding:0;display:grid}
  .chat-list-panel{height:100%;border-right:1px solid var(--line);padding:24px 10px}
  .chat-view.chat-open .chat-list-panel{display:block}.conversation,.chat-view.chat-open .conversation{display:flex}
  .chat-active .shell{padding-bottom:0}.chat-active .navigation{display:none}
  .conversation-header{padding:12px;min-height:68px}.mobile-back{display:inline-grid}
  .messages{padding:14px}.view:not(.chat-view){max-width:850px;margin:auto;padding:28px}
}
@media(max-width:700px){
  .chat-view{display:block}.chat-list-panel{border:0}.conversation{display:none}
  .chat-view.chat-open .chat-list-panel{display:none}.chat-view.chat-open .conversation{display:flex}
  .conversation-header{gap:8px;padding:8px 10px}.conversation-header .icon-button{width:40px;height:44px}
  .conversation-header .view-person{padding:6px 9px;font-size:12px;min-height:40px}.conversation-person h2{font-size:15px}
  .conversation-header .avatar{width:38px;height:38px}.conversation-header p{font-size:10px}
  .composer{gap:6px;padding:8px 10px max(8px,var(--safe-bottom))}.composer .icon-button{width:42px;height:44px}
  .message{max-width:90%;padding:8px 11px}.messages{padding:12px 10px}.reply-strip{padding:6px 12px}
  .chat-active .toast{bottom:calc(76px + var(--safe-bottom))}.view:not(.chat-view){padding:22px 16px}
  input,textarea,select,.profile-form input:not([type=checkbox]),.profile-form textarea,.profile-form select,.search input{font-size:16px}
}
@media(max-width:360px){.conversation-header .view-person{font-size:11px;padding:6px}.conversation-header .avatar{width:32px;height:32px}.conversation-header{gap:6px}.own-summary{gap:12px;padding:14px}.own-avatar{width:60px;height:75px}.own-summary h2{font-size:18px}.page-heading{flex-wrap:wrap}.photo-slot,.photo-add{width:80px;height:96px}.portrait-info{left:16px;right:16px}}
@media(max-height:500px) and (orientation:landscape){.conversation-header{min-height:54px;padding-top:5px;padding-bottom:5px}.composer{padding-top:5px;padding-bottom:max(5px,var(--safe-bottom))}.reply-strip{padding-top:3px;padding-bottom:3px}.view:not(.chat-view){padding-top:16px}.portrait{max-height:none;aspect-ratio:4/3}.navigation nav a{padding-top:5px;padding-bottom:5px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.spinner{animation:none}}


.match-grid button{display:flex;flex-direction:column;gap:8px;align-items:center;min-width:0}.match-grid .avatar{width:80px;height:80px;flex-shrink:0}.match-grid .avatar img{width:100%;height:100%;object-fit:cover}
@media(max-width:760px){.navigation nav{grid-template-columns:repeat(4,minmax(0,1fr))}.navigation nav a{padding-left:4px;padding-right:4px;font-size:11px}}

/* Пустой список занимает всю сетку, а не первую колонку. */
#likes-content .match-grid > .empty{grid-column:1 / -1;width:100%;justify-self:stretch;text-align:center}

/* Подписи выровнены непосредственно под соответствующими действиями. */
.profile-actions{display:grid;grid-template-columns:repeat(3,86px);gap:12px;justify-content:center;justify-items:center;align-items:center}
.action-labels{display:grid;grid-template-columns:repeat(3,86px);gap:12px;justify-content:center;text-align:center;font-size:12px;line-height:1.4;margin-top:10px;color:var(--muted)}
.action-labels span{white-space:nowrap}
#discover-content .next-profile{display:flex;margin:14px auto 0;padding:10px 18px;font-size:14px}
@media(max-width:360px){.profile-actions,.action-labels{grid-template-columns:repeat(3,78px);gap:6px}.action-labels{font-size:11px}}
