/* Мобильная версия: выдвижное меню, нижняя панель, компактная шапка */
.burger, .bottom-nav, .drawer-backdrop { display:none; }
.burger { width:40px; height:40px; border:none; border-radius:50%; background:var(--surface-3); align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; }
.burger svg { width:22px; height:22px; fill:var(--text-2); }
.nav-item.active, .bottom-nav a.active { font-weight:700; }

@media (max-width: 900px) {
  .header { padding:0 12px; gap:8px; }
  .header-left { gap:8px; }
  .burger { display:flex; }
  .logo-text { display:none; }
  .header-center { max-width:none; min-width:0; margin:0; }
  .search-bar input { min-width:0; width:100%; }
  .header-right { flex-shrink:0; }
  .search-bar { width:100%; padding:0 12px; }
  .header-right { gap:6px; }
  #btnCreateProject, .user-info { display:none; }
  .wallet-chip { padding:8px 10px; }
  .notif-dropdown { position:fixed; top:68px; left:8px; right:8px; width:auto; }
  .dropdown { right:-4px; }

  /* боковое меню превращается в выдвижную панель */
  .sidebar-left { display:block !important; position:fixed; top:0; left:0; bottom:0; width:min(300px,85vw); height:100% !important; z-index:900; transform:translateX(-102%); transition:transform .25s ease; box-shadow:none; padding-top:18px; padding-bottom:30px; -webkit-overflow-scrolling:touch; }
  body.menu-open .sidebar-left { transform:none; box-shadow:6px 0 30px rgba(0,0,0,.3); }
  .drawer-backdrop { display:block; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:800; opacity:0; pointer-events:none; transition:opacity .25s; }
  body.menu-open .drawer-backdrop { opacity:1; pointer-events:auto; }
  body.menu-open { overflow:hidden; }

  /* нижняя панель навигации */
  .bottom-nav { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:700; background:var(--surface); border-top:1px solid var(--border); padding:6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content:space-around; align-items:center; }
  .bottom-nav a { flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; font-size:10px; color:var(--muted); cursor:pointer; padding:4px 0; min-width:0; -webkit-tap-highlight-color:transparent; }
  .bottom-nav a svg { width:22px; height:22px; fill:currentColor; }
  .bottom-nav a.active { color:var(--accent); }
  .bottom-nav a.bn-plus { flex:0 0 48px; width:48px; height:48px; border-radius:50%; background:var(--accent); color:#fff; justify-content:center; margin:-14px 4px 0; box-shadow:0 4px 12px rgba(0,0,0,.25); }
  .bottom-nav a.bn-plus svg { width:26px; height:26px; }

  .main-content { padding:16px 14px calc(84px + env(safe-area-inset-bottom)); }
  .toast { left:12px; right:12px; bottom:calc(80px + env(safe-area-inset-bottom)); text-align:center; }
  .layout { min-height:0; }
}

@media (max-width: 600px) {
  .page-title { font-size:22px; }
  .modal-overlay { padding:0; align-items:flex-end; }
  .modal { max-width:none !important; max-height:92vh; border-radius:18px 18px 0 0; }
  .modal-body { padding:18px 16px; }
  .modal-header, .modal-footer { padding-left:16px; padding-right:16px; }
  .modal-footer { position:sticky; bottom:0; background:var(--surface); flex-wrap:wrap; }
  .project-detail-stats { grid-template-columns:repeat(2,1fr); }
  .project-detail-actions { flex-wrap:wrap; }
  .composer { flex-wrap:wrap; }
  .form-input, .form-textarea, .form-select, .search-bar input { font-size:16px; } /* iOS не приближает страницу при вводе */
  .funding-footer { flex-wrap:wrap; }
  .tabs-row { overflow-x:auto; flex-wrap:nowrap; padding-bottom:4px; }
  .tabs-row .tab-btn { white-space:nowrap; flex-shrink:0; }
}
@media (max-width: 380px) { .wallet-chip svg { display:none; } .header-icon { width:36px; height:36px; } }
@media (display-mode: standalone) { .header { padding-top:env(safe-area-inset-top); height:calc(64px + env(safe-area-inset-top)); } }
