/* Коноша 29 — стили v2 */
:root{--bg:#eef1f5;--card:#fff;--text:#10151d;--muted:#68727f;--border:#e2e7ee;--accent:#0077ff;--accent-soft:#e8f1ff}
[data-theme="dark"]{--bg:#0d1219;--card:#161c26;--text:#e8edf4;--muted:#8b96a5;--border:#232c3a;--accent:#3d8eff;--accent-soft:#12233c}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:15px;background:var(--bg);color:var(--text)}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
input,textarea,select{font:inherit;color:var(--text);background:var(--card);border:1px solid var(--border);border-radius:10px;padding:10px 12px;width:100%}
.muted{color:var(--muted)}.small{font-size:13px}.tiny{font-size:12px}.pad{padding:14px}
.topbar{position:fixed;inset:0 0 auto 0;height:56px;background:var(--card);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 14px;z-index:50}
.logo{display:flex;align-items:center;gap:10px;font-weight:800}
.logo-badge{width:35px;height:35px;border-radius:11px;background:linear-gradient(135deg,#0066dd,#00b0ff);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800}
.logo b{color:var(--accent)}
.top-right{display:flex;align-items:center;gap:8px}
.icon-btn{width:38px;height:38px;border-radius:10px;color:var(--muted)}
.layout{max-width:1100px;margin:0 auto;padding:70px 14px 90px;display:grid;grid-template-columns:210px minmax(0,1fr);gap:16px;align-items:start}
.sidebar,.rightbar{position:sticky;top:70px;display:flex;flex-direction:column;gap:12px}
.card{background:var(--card);border:1px solid var(--border);border-radius:14px}
.nav-item{display:flex;gap:11px;align-items:center;width:100%;padding:10px 13px;border-radius:11px;font-weight:600}
.nav-item.active{background:var(--accent-soft);color:var(--accent)}
.main{display:flex;flex-direction:column;gap:12px;min-width:0}
.post header{display:flex;gap:10px;padding:13px 14px 0;align-items:center}
.post h3{padding:10px 14px 0;font-size:17px}
.post .body{padding:7px 14px 0;line-height:1.5}
.post footer{display:flex;gap:6px;align-items:center;padding:9px 10px;border-top:1px solid var(--border);margin-top:10px}
.act{padding:7px 11px;border-radius:10px;color:var(--muted);font-weight:600;font-size:13px}
.act:hover{background:var(--accent-soft);color:var(--accent)}
.views{margin-left:auto;color:var(--muted);font-size:12px}
.avatar{border-radius:50%;background:var(--accent);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700;object-fit:cover;flex:none}
.btn{border-radius:11px;padding:10px 16px;font-weight:700;background:var(--accent-soft);color:var(--accent)}
.btn.primary{background:var(--accent);color:#fff}
.composer{display:flex;flex-direction:column;gap:8px}
.toolbar{display:flex;gap:4px}
.tb-btn{min-width:34px;height:32px;border:1px solid var(--border);border-radius:9px;color:var(--muted);font-weight:700}
.rte{min-height:110px;border:1px solid var(--border);border-radius:10px;padding:10px 12px;line-height:1.5}
.rte:empty::before{content:attr(data-placeholder);color:var(--muted)}
.rich p,.rich div{margin:.3em 0}.rich ul,.rich ol{padding-left:20px}
.photos{display:grid;gap:3px;margin-top:10px}
.photos .ph{overflow:hidden}
.photos img{width:100%;height:100%;object-fit:cover;cursor:zoom-in}
.ph-1{grid-template-columns:1fr}.ph-1 .ph{aspect-ratio:16/10}
.ph-2{grid-template-columns:1fr 1fr}.ph-2 .ph{aspect-ratio:1}
.ph-n{grid-template-columns:1fr 1fr}.ph-n .ph{aspect-ratio:16/10}.ph-n .ph:first-child{grid-column:1/-1;aspect-ratio:16/9}
.ph-preview{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.ph-item{position:relative;aspect-ratio:1;border-radius:8px;overflow:hidden}
.ph-item img{width:100%;height:100%;object-fit:cover}
.ph-item button{position:absolute;top:3px;right:3px;width:20px;height:20px;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;font-size:11px}
.lightbox{position:fixed;inset:0;z-index:300;background:rgba(0,0,0,.92);display:flex;align-items:center;justify-content:center}
.lb-img{max-width:100%;max-height:88dvh;object-fit:contain}
.lb-top{position:absolute;top:8px;right:10px;left:10px;display:flex;justify-content:space-between;color:#fff}
.lb-count{background:rgba(255,255,255,.15);border-radius:8px;padding:4px 10px;font-size:13px}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:20px}
.lb-nav.prev{left:8px}.lb-nav.next{right:8px}
.tabbar{position:fixed;bottom:0;left:0;right:0;background:var(--card);border-top:1px solid var(--border);display:none;z-index:50;padding-bottom:env(safe-area-inset-bottom)}
.tab{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 0 6px;color:var(--muted)}
.tab.active{color:var(--accent)}
.tab em{font-style:normal;font-size:10px}
.backdrop{position:fixed;inset:0;background:rgba(8,14,26,.5);display:flex;align-items:center;justify-content:center;z-index:100;padding:14px}
.modal{background:var(--card);border-radius:16px;width:100%;max-width:460px;max-height:92dvh;overflow:auto}
.modal.login{padding:22px;text-align:center;display:flex;flex-direction:column;gap:9px}
.oauth{display:flex;align-items:center;justify-content:center;gap:10px;border-radius:12px;padding:12px;font-weight:700;color:#fff}
.oauth.vk{background:#0077ff}.oauth.ya{background:#fc3f1d}
.oauth-mini{width:28px;height:28px;border-radius:8px;background:rgba(255,255,255,.2);font-weight:800}
.link{color:var(--muted);font-size:13px}
.postview{max-width:640px;display:flex;flex-direction:column;height:92dvh}
.pv-head{display:flex;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--border)}
.pv-scroll{flex:1;overflow:auto;padding:14px}
.comment{display:flex;gap:10px;padding:9px 2px}
.c-body p{margin-top:2px;line-height:1.45}
.c-acts{display:flex;gap:14px;margin-top:4px}
.c-acts button{color:var(--muted);font-size:12.5px;font-weight:600}
.kids{margin-left:44px;border-left:2px solid var(--border);padding-left:10px}
.kids .kids{margin-left:14px}
.expand{color:var(--accent);font-size:13px;font-weight:600;padding:4px 6px}
.pv-bar{border-top:1px solid var(--border);padding:10px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pv-bar input{flex:1}
#replyHint{width:100%}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#10151d;color:#fff;border-radius:12px;padding:11px 18px;font-size:13.5px;font-weight:600;z-index:400;max-width:88vw}
@media (max-width:768px){
  .layout{grid-template-columns:minmax(0,1fr);padding:64px 10px 84px}
  .sidebar{display:none}
  .tabbar{display:flex}
  .modal{max-width:100%;height:100dvh;border-radius:0}
  .postview{height:100dvh}
}

/* --- Новые стили v3: Коноша 29, скрытие текста, иконки --- */
.official-avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border); flex: none; background: var(--card);
}
.post .body.rich {
  max-height: 120px; overflow: hidden; position: relative;
  transition: max-height 0.3s ease;
}
.post .body.rich.expanded { max-height: 2000px; }
.post .body.rich:not(.expanded)::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 45px;
  background: linear-gradient(to bottom, transparent, var(--card));
  pointer-events: none;
}
.read-more-btn {
  display: none; width: 100%; text-align: center; padding: 8px;
  color: var(--accent); font-weight: 600; font-size: 13px;
  background: none; border: none; border-top: 1px solid var(--border);
  cursor: pointer; margin-top: 5px; transition: background 0.2s;
}
.read-more-btn:hover { background: var(--accent-soft); }
.act i, .views i { vertical-align: -3px; margin-right: 4px; }
.ph-item button i { vertical-align: -2px; }

/* Современный дизайн входа v3 */
.modal.login.modern {
  background: linear-gradient(135deg, var(--card) 0%, var(--accent-soft) 100%);
  border: none; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden; padding: 0; max-width: 400px;
}
.login-header {
  background: linear-gradient(135deg, var(--accent) 0%, #00b0ff 100%);
  color: #fff; padding: 40px 30px; text-align: center;
}
.login-badge {
  width: 70px; height: 70px; border-radius: 20px;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 900; margin: 0 auto 15px;
  backdrop-filter: blur(10px);
}
.login-header h2 { font-size: 26px; margin-bottom: 8px; font-weight: 800; }
.login-header p { opacity: 0.9; font-size: 14px; }
.login-body { padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.oauth-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 16px 20px; border-radius: 14px;
  font-weight: 700; font-size: 15px; color: #fff;
  transition: all 0.2s; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.oauth-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.oauth-btn.vk { background: linear-gradient(135deg, #0077ff 0%, #0095ff 100%); }
.oauth-btn.ya { background: linear-gradient(135deg, #fc3f1d 0%, #ff5733 100%); }
.modal.login.modern .link {
  text-align: center; padding: 15px; margin-top: 10px;
  border-top: 1px solid var(--border);
}

/* Компактный вход v4 */
.modal.login.compact {
  max-width: 320px; padding: 0; border-radius: 20px;
  background: var(--card); box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.login-head {
  background: linear-gradient(135deg, var(--accent) 0%, #00b0ff 100%);
  color: #fff; padding: 25px; text-align: center;
}
.logo-badge-lg {
  width: 60px; height: 60px; border-radius: 16px;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; margin: 0 auto 10px;
}
.login-head h3 { font-size: 20px; font-weight: 800; margin: 0; }
.login-opts { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.opt-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 12px;
  font-weight: 700; font-size: 14px; color: #fff;
  transition: transform 0.2s;
}
.opt-btn:hover { transform: scale(1.02); }
.opt-btn.vk { background: #0077ff; }
.opt-btn.ya { background: #fc3f1d; }
.cancel-btn {
  width: 100%; padding: 12px; border-top: 1px solid var(--border);
  background: none; color: var(--muted); font-weight: 600;
}

/* Фикс v5: отступ времени и компактная модалка */
.who b { margin-right: 6px; }
.modal.login.compact {
  max-height: none !important; height: auto !important;
  min-height: auto !important;
}
.modal.login.compact .backdrop {
  align-items: flex-start; padding-top: 20vh;
}
