:root{
  --bg:#151518;
  --card:#212121;
  --muted:#a7a7ad;
  --text:#ffffff;
  --line:rgba(255,255,255,.08);
  --accent:#7aa2ff;
  --danger:#ff6b6b;
  --ok:#44d19a;
  --r:18px;
  /* полоса под bol1 слева от колонки 1fr (лента/посты), без захода на контент */
  --header-logo-rail:5.75rem;
}
*{box-sizing:border-box}
html,body{
  min-height:100%;
  background:var(--bg);
}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background:var(--bg);
  color:var(--text);
}
a{color:inherit;text-decoration:none}
.wrap{max-width:1320px;margin:0 auto;padding:16px}
.layout-header{
  margin:0 0 12px;
  padding:8px 0 10px;
  background:var(--bg);
  border-bottom:1px solid var(--line);
}
.layout-header + .layout{margin-top:4px}
.layout-header .rightcol.header-rail{
  position:static;
  top:auto;
  align-self:start;
}
.header-main-col{min-width:0;width:100%}
/* Лого вне колонки постов (absolute влево от inner); поиск по центру той же ширины, что и блок постов */
.header-main-inner{
  position:relative;
  display:flex;
  justify-content:space-between;
  align-items:center;
  width:100%;
}
.layout-header .header-search-block{
  flex:1;
  max-width:min(900px,100%);
}
.header-logo-start{
  white-space:nowrap;
  margin-right:24px;
}
.header-profile-rail{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  width:100%;
  flex-wrap:nowrap;
}
.search-hero-form{width:100%;display:flex;align-items:stretch;gap:12px}
.search-hero-input{
  flex:1;
  min-width:0;
  min-height:70px;
  padding:18px 28px;
  font-size:20px;
  border-radius:20px;
}
.search-hero-btn{
  flex-shrink:0;
  min-height:70px;
  padding:0 35px;
  font-size:18px;
  border-radius:20px;
}
.topbox{background:rgba(33,33,33,.55);border:1px solid var(--line);border-radius:16px;padding:8px}
.top-center-box{position:relative;width:100%}
.search-suggest{position:absolute;top:100%;left:0;right:0;margin-top:8px;border-radius:16px;overflow:hidden;z-index:30;box-shadow:0 12px 40px rgba(0,0,0,.35)}
.notif-bell{
  width:48px;height:48px;border-radius:50%;border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.16);color:var(--text);
  font-size:22px;cursor:pointer;line-height:1;
  display:inline-flex;align-items:center;justify-content:center;
  transition:background .15s ease, border-color .15s ease;
}
.notif-bell:hover{background:rgba(255,255,255,.24);border-color:rgba(255,255,255,.26);}
.suggest-row{display:flex!important;justify-content:space-between;width:100%;margin-bottom:6px}
.brand-logo{display:inline-flex;align-items:center;padding:12px 18px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.03);font-weight:800;letter-spacing:.4px;font-size:18px}
.auth-link{display:inline-flex;align-items:center;padding:12px 22px;border-radius:16px;background:rgba(122,162,255,.22);color:var(--text);font-weight:650;border:none;font-size:16px}
.auth-link:hover{filter:brightness(1.08)}
.btn-plain{background:transparent;border:none;color:var(--text);padding:8px 10px;border-radius:12px}
.btn-plain:hover{background:rgba(255,255,255,.06)}
.user-menu-wrap{position:relative;flex:0 1 auto;min-width:0;max-width:100%}
.user-menu-btn{width:100%;min-width:0;max-width:280px;padding:8px 12px;border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.05);color:var(--text);font-weight:650;cursor:pointer;text-align:left}
.layout-header .user-menu-btn{max-width:260px}
.user-menu-inner{display:flex;align-items:center;gap:12px;width:100%;min-width:0}
.user-menu-btn .avatar-wrap .avatar{flex-shrink:0;width:38px!important;height:38px!important;font-size:15px}
.user-menu-name{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-menu-dd{position:absolute;right:0;top:100%;margin-top:6px;min-width:200px;display:none;z-index:25}
.user-menu-item{display:block;padding:8px 10px;border-radius:10px;color:var(--text)}
.user-menu-item:hover{background:rgba(255,255,255,.06)}
.layout-single{grid-template-columns:1fr}
.pill{padding:8px 10px;border-radius:999px;border:1px solid var(--line);background:rgba(255,255,255,.03)}
.layout{display:grid;grid-template-columns:1fr minmax(240px,280px);gap:20px;margin-top:16px;align-items:flex-start;justify-content:center}
.layout-profile{grid-template-columns:1fr;max-width:820px;margin-left:auto;margin-right:auto;width:100%}
.rightcol{position:sticky;top:92px;align-self:start;}
.card.card-pad{position:static;}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r);
}
.card-pad{padding:14px}
.muted{color:var(--muted)}
.btn{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
}
.btn:hover{border-color:rgba(255,255,255,.16)}
.btn.primary{background:rgba(122,162,255,.18);border-color:rgba(122,162,255,.35)}
.btn.danger{background:rgba(255,107,107,.12);border-color:rgba(255,107,107,.30)}
.row{display:flex;gap:10px;align-items:center}
.col{display:flex;flex-direction:column;gap:10px}
.input,.textarea{
  width:100%;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--text);
  border-radius:14px;
  padding:10px 12px;
  outline:none;
}
.textarea{min-height:96px;resize:vertical}
.hr{height:1px;background:var(--line);margin:12px 0}
.post-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.avatar{width:36px;height:36px;border-radius:999px;background:rgba(255,255,255,.08);display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover}
.avatar-wrap{position:relative;display:inline-flex;vertical-align:middle;flex-shrink:0}
.avatar-wrap--online::after{
  content:'';
  position:absolute;
  right:1px;
  bottom:1px;
  width:11px;
  height:11px;
  background:var(--ok);
  border:2px solid var(--bg);
  border-radius:50%;
  box-shadow:0 0 0 1px rgba(0,0,0,.3);
}
.presence-dot--inline{
  display:inline-block;
  width:8px;
  height:8px;
  background:var(--ok);
  border-radius:50%;
  vertical-align:middle;
  margin-right:4px;
  box-shadow:0 0 0 2px var(--card);
}
.kebab{width:38px;height:38px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);background:rgba(255,255,255,.03);cursor:pointer}
.post-kebab-wrap{position:relative;flex-shrink:0;align-self:flex-start}
.post-kebab-menu{
  position:absolute;right:0;top:calc(100% + 6px);min-width:200px;z-index:26;
  box-shadow:0 12px 40px rgba(0,0,0,.35);border-radius:var(--r);
}
.post-kebab-menu-inner{padding:8px!important}
.post-kebab-report{
  display:block;width:100%;text-align:left;padding:10px 12px;border:none;border-radius:12px;
  background:transparent;color:var(--danger);font-weight:650;cursor:pointer;font-size:15px;font-family:inherit;
}
.post-kebab-report:hover{background:rgba(255,107,107,.12)}
.feed-report-box{border-radius:var(--r)}
.actions{display:flex;gap:10px;align-items:center;margin-top:10px}
.chip{display:inline-flex;gap:6px;align-items:center;padding:7px 10px;border-radius:999px;border:1px solid var(--line);background:rgba(255,255,255,.03)}
.chip b{font-weight:650}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rightcol{position:sticky; top:92px; align-self:start;}
.tag{display:inline-flex;gap:8px;align-items:center;padding:6px 10px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.03);font-size:13px}
.badge{display:inline-flex;gap:6px;align-items:center;padding:6px 10px;border-radius:999px;background:rgba(122,162,255,.14);border:1px solid rgba(122,162,255,.28);font-size:13px}
.err{color:var(--danger)}
.ok{color:var(--ok)}
.flash{margin-bottom:10px;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.04)}
.flash-toast{
  position:fixed;top:max(16px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);
  z-index:2000;max-width:min(440px,calc(100vw - 24px));padding:12px 18px;border-radius:14px;
  border:1px solid var(--line);background:var(--card);box-shadow:0 14px 48px rgba(0,0,0,.45);
  font-size:15px;line-height:1.35;text-align:center;
}
.flash-toast--ok{border-color:rgba(68,209,154,.35)}
.flash-toast--err{border-color:rgba(255,107,107,.4)}
.flash-toast--out{opacity:0;transition:opacity .28s ease}
.notif{position:relative;display:flex;align-items:center}
.notif-bell-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}
.notif-hot{
  position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;padding:0 4px;border-radius:999px;
  background:var(--danger);color:#fff;font-size:11px;font-weight:900;line-height:18px;text-align:center;
  pointer-events:none;box-shadow:0 0 0 2px var(--bg);
}
.notif-line{display:block;font-size:14px;line-height:1.35}
.notif-menu{position:absolute;right:0;top:calc(100% + 8px);width:min(320px,92vw);display:none;z-index:20}
.notif-btn{width:100%;text-align:left;justify-content:flex-start;border-radius:12px}
.notif-unread{border-color:rgba(122,162,255,.55)}
.notif-time{font-size:11px;color:var(--muted);display:block;margin-top:4px}
.notif-new{background:rgba(122,162,255,.05)}
.notif-old{background:rgba(255,255,255,.01)}
.attach{display:flex;gap:8px;align-items:center;flex-wrap:wrap;position:relative}
.attach input[type=file]{display:none}
.attach label{cursor:pointer}
.clip-menu{position:absolute;top:42px;left:0;min-width:220px;display:none;z-index:8}
.clip-menu .card-pad{padding:10px}
.vote-row{display:flex;align-items:center;gap:8px}
.vote-num{min-width:32px;text-align:center;font-weight:700}
.like-form{display:inline;margin:0;padding:0}
.like-btn{border-radius:999px;padding:8px 16px;font-weight:650}
.like-fallback{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:999px;border:1px solid var(--line);background:rgba(255,255,255,.03);font-weight:650}
.comment-node{border-left:2px solid rgba(255,255,255,.1);padding-left:12px;margin-left:2px}
.comment-node-inner{padding:4px 0}
.comment-replies-fold{border:none;margin:0;padding:0}
.comment-replies-fold > summary.comment-replies-sum{
  list-style:none;cursor:pointer;font-size:13px;margin-top:6px;padding:4px 0;
  color:var(--muted);
}
.comment-replies-fold > summary::-webkit-details-marker{display:none}
.comment-replies-list{margin-top:8px;padding-left:4px;display:flex;flex-direction:column;gap:10px}
.comment-forest{gap:14px!important}
.profile-back-row{margin-bottom:12px}
.btn-back{padding:8px 14px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.04);font-weight:650;display:inline-flex;align-items:center;gap:6px}
.profile-hero{padding-bottom:16px;border-bottom:1px solid var(--line);margin-bottom:8px}
.profile-meta-row{gap:8px;flex-wrap:wrap;margin-top:4px}
.profile-stat-pill{font-size:13px;color:var(--muted)}
.profile-badges{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.profile-badge-chip{font-size:13px;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.06)}
.profile-reg{font-size:13px;margin-top:10px}
.profile-section{padding:16px 0;border-bottom:1px solid var(--line)}
.profile-section:last-child{border-bottom:none}
/* Посты в профиле */
.profile-post-list{display:flex;flex-direction:column;gap:16px}
.profile-post-item{
  display:block;
  padding:16px;
  border-radius:14px;
  background:rgba(255,255,255,.02);
  border:1px solid var(--line);
  transition:all .2s ease;
}
.profile-post-item:hover{
  background:rgba(255,255,255,.05);
  border-color:var(--line);
}
.profile-post-item:last-child{border-bottom:none}
.profile-post-time{font-size:12px;color:var(--muted);display:block;margin-bottom:8px;font-weight:500}

.profile-hero-banner{width:100%;height:120px;object-fit:cover;display:block;border-radius:18px;margin-bottom:16px;}
.profile-hero-card{padding:20px;}


.profile-hero-card{
  position:relative;
  padding:20px;
}

.profile-hero-inner{
  position:relative;
  display:flex;
  gap:16px;
  align-items:flex-start;
  padding-right:140px;
}

.profile-hero-avatar{
  flex-shrink:0;
}

.profile-hero-info{
  flex:1;
  min-width:0;
}

.profile-hero-actions{
  position:absolute;
  top:0;
  right:0;
  display:flex;
  gap:10px;
  align-items:center;
}


.profile-hero-avatar{position:relative;z-index:2;}
.profile-hero-avatar .avatar{width:96px!important;height:96px!important;border:4px solid var(--card);}
.profile-hero-info{display:flex;flex-direction:column;gap:10px;min-width:0;}
.profile-hero-name{display:flex;flex-wrap:wrap;gap:10px;align-items:center;font-size:22px;line-height:1.1;}
.profile-hero-username{color:var(--muted);font-size:14px;}
.profile-hero-stats{display:flex;flex-wrap:wrap;gap:12px;font-size:14px;color:var(--muted);}
.profile-hero-badges{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px;}
.profile-hero-reg{font-size:13px;color:var(--muted);}

.banner-crop-preview{width:100%;aspect-ratio:5/1;background-color:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:18px;background-size:cover;background-position:50% 50%;background-repeat:no-repeat;}
.crop-controls{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:14px;}
.crop-row{display:flex;justify-content:space-between;align-items:center;gap:12px;}
.crop-label{font-size:13px;color:var(--muted);}
.file-picker-btn{position:relative;overflow:hidden;}
.file-picker-btn input[type=file]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;}

.profile-post-snippet{
  font-size:15px;
  line-height:1.5;
  white-space:pre-wrap;
  word-break:break-word;
  color:var(--text);
}
.profile-post-media{
  margin-top:12px;
  border-radius:12px;
  overflow:hidden;
  max-height:200px;
  position:relative;
}
.profile-post-media::after{
  content:'';
  position:absolute;
  bottom:0;left:0;right:0;
  height:40px;
  background:linear-gradient(transparent,rgba(0,0,0,.5));
}
.profile-post-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.wall-list{margin-top:12px}
.wall-item{padding:14px 0;border-bottom:1px solid var(--line)}
.wall-item:last-child{border-bottom:none}
.wall-text{margin-top:10px;white-space:pre-wrap;word-break:break-word;font-size:15px;line-height:1.45}
.wall-form{margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid var(--line)}

/* Стили профиля */
.layout-profile{
  margin-top:16px;
  display:grid;
  grid-template-columns:1fr minmax(240px,280px);
  gap:20px;
  align-items:start;
  justify-content:center;
  max-width:1320px;
  margin-left:auto;
  margin-right:auto;
  width:100%;
}
.profile-main .card{margin-bottom:20px}
.profile-main .card:last-child{margin-bottom:0}

/* Hero-карточка профиля */
.profile-hero-card{padding:20px}

.profile-hero-avatar{flex-shrink:0}
.profile-hero-info{flex:1;min-width:0}
.profile-hero-name{font-weight:900;font-size:22px;line-height:1.2;margin-bottom:2px}
.profile-hero-badge{vertical-align:middle;margin-left:6px;font-size:12px}
.profile-hero-username{color:var(--muted);font-size:15px;margin-bottom:12px}
..profile-hero-stats{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:10px}
.profile-hero-stat{font-size:14px;color:var(--muted)}
.profile-hero-stat b{color:var(--text);font-weight:700}
.profile-hero-badges{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.profile-hero-badges .badge{font-size:12px;padding:4px 10px}
.profile-hero-reg{font-size:13px}

/* Табы профиля */
.profile-tabs{display:flex;gap:4px;margin-bottom:16px;background:rgba(255,255,255,.04);border-radius:14px;padding:4px;border:1px solid var(--line)}
.profile-tab{
  flex:1;
  padding:10px 16px;
  border-radius:10px;
  border:none;
  background:transparent;
  color:var(--muted);
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:all .2s ease;
  text-align:center
}
.profile-tab:hover{color:var(--text);background:rgba(255,255,255,.04)}
.profile-tab.active{
  background:rgba(122,162,255,.18);
  color:var(--text);
  border-color:rgba(122,162,255,.35)
}
.profile-tab-content{min-height:100px}

/* Адаптив для профиля */
/* Окно "Поделиться" */
.share-modal{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(0,0,0,.6);
  z-index:1000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.share-modal-content{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:20px;
  max-width:400px;
  width:100%;
  box-shadow:0 12px 40px rgba(0,0,0,.4);
}
.share-modal-title{
  font-weight:700;
  font-size:16px;
  margin-bottom:12px;
}
.share-modal-url{
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 12px;
  font-size:13px;
  word-break:break-all;
  margin-bottom:16px;
  color:var(--muted);
}
.share-modal-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.share-modal-actions .btn{
  flex:1;
  min-width:80px;
  text-align:center;
  font-size:13px;
  padding:8px 12px;
}

@media (max-width: 920px){
  .layout-profile{grid-template-columns:1fr}
  .layout-profile .rightcol{display:none}
  .wrap{
    max-width:1320px;
    margin:0 auto;
    padding:16px;
  }
  .layout{grid-template-columns:1fr;margin-top:10px;gap:14px}
  header.layout.layout-header{
    gap:12px;
  }
  .header-profile-rail{
    width:100%;
    justify-content:space-between;
  }
  .layout-header .header-main-inner{
    flex-direction:column;
    align-items:stretch;
    gap:12px;
  }
  .layout-header .header-search-block{
    max-width:100%;
  }
  .layout-header .header-logo-start{
    position:static;
    transform:none;
    margin-right:0;
    align-self:flex-start;
  }
  .layout-header .header-profile-rail{
    justify-content:flex-end;
    flex-wrap:wrap;
  }
  .user-menu-btn{max-width:none;width:auto;min-width:0}
  .rightcol{position:static}
  .card{border-radius:16px}
  .card-pad{padding:12px}
  .search-hero-form{flex-direction:column;align-items:stretch}
  .search-hero-input{font-size:16px;min-height:50px;padding:14px 16px;border-radius:16px}
  .search-hero-btn{min-height:50px;padding:0 20px;border-radius:16px;width:100%}
  .post-head{gap:8px}
  .actions{flex-wrap:wrap;gap:8px}
  .notif-menu{right:auto;left:0;width:min(360px,calc(100vw - 24px))}
}
@media (max-width: 600px){
  .profile-hero-avatar{align-self:center}
  .profile-hero-info{align-items:center}
  .profile-hero-stats{justify-content:center}
  .profile-hero-badges{justify-content:center}
}

@media (min-width: 921px){
  .wrap{
    padding-left:calc(16px + var(--header-logo-rail));
  }
  .layout-header .header-logo-start {
    position: absolute;
    left: calc(-16px - var(--header-logo-rail));
    margin-right: 0;
  }
}

@media (max-width: 520px){
  .brand-logo{padding:8px 12px;font-size:15px}
  .notif-bell{width:44px;height:44px;font-size:18px}
  .auth-link{padding:10px 14px;font-size:14px}
}

/* Audio player styling */
audio {
  width: 100%;
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  outline: none;
}
audio::-webkit-media-controls-panel {
  background: var(--card);
  border-radius: 12px;
}
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
  color: var(--text);
}
audio::-webkit-media-controls-timeline {
  background: var(--line);
  border-radius: 4px;
}
audio::-webkit-media-controls-volume-slider {
  background: var(--line);
}

/* Кнопка "наверх" */
.scroll-top-btn{
  position:fixed;bottom:24px;right:24px;width:48px;height:48px;
  border-radius:50%;background:var(--card);border:1px solid var(--line);
  color:var(--text);font-size:20px;cursor:pointer;z-index:100;
  display:none;align-items:center;justify-content:center;
  box-shadow:0 4px 16px rgba(0,0,0,.35);
}
.scroll-top-btn.visible{display:flex}
@media (max-width: 920px){
  .scroll-top-btn{bottom:16px;right:16px;width:44px;height:44px}
}

.comment-replies {
  margin-top: 10px;
  margin-left: 20px;           /* сдвиг вправо */
  padding-left: 12px;
  border-left: 2px solid var(--line, #e5e5e5); /* линия */
}

.comment-replies .comment-node {
  margin-top: 10px;
}

.profile-hero-card{
    position:relative;
}

