@media (max-width: 1100px) {
    .sidebar-right { display: none; }
    .layout { grid-template-columns: 220px 1fr; }
    .header-quick-links { display: none !important; }
    .empty-state-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .mobile-nav-overlay { display: block; }
    .mobile-nav-overlay { height: 100dvh; }
    .mobile-nav-panel { bottom: auto; height: 100dvh; max-height: 100dvh; }
    .hamburger-btn { display: flex; }
    .nav { display: none; }
    .site-return-link { display: none; }
    .logo-divider { display: none; }
    .search-box { flex: 1; min-width: 0; }
    .sidebar-left { display: none; }
    .layout { grid-template-columns: 1fr; padding: 0.75rem; }
    .header-inner { gap: 0.75rem; }
    .content-header { flex-wrap: wrap; gap: 0.5rem; padding: 0.6rem 0.75rem; }
    .section-title { flex: 1 1 100%; order: -1; }
    .sort-tabs { flex-wrap: wrap; }
    .header-status-tabs { flex-wrap: wrap; }
    .btn-start { width: 100%; justify-content: center; }
    .post-item { grid-template-columns: 44px 1fr; }
    .post-resonans { padding: 0.5rem 0; }
    .post-main { padding: 0.65rem 0.75rem; }
    .post-title { font-size: 0.88rem; }
    .post-excerpt { font-size: 0.75rem; }
    .post-meta { gap: 0.35rem; }
    .modal { width: 100%; max-width: 100dvw; max-height: 100dvh; border: none; }
    .modal-overlay { align-items: flex-end; }
    .modal-header { padding: 0.85rem 1rem; }
    .modal-close { width: 36px; height: 36px; font-size: 1.3rem; }
    .modal-body { padding: 1rem; }
    .modal-footer { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
    .modal-footer .modal-hint { width: 100%; order: 1; }
    .form-row { grid-template-columns: 1fr; }
    .user-profile-content { width: 100%; max-width: 100dvw; max-height: 100dvh; border: none; }
    .mod-dashboard-content { width: 100%; max-width: 100dvw; max-height: 100dvh; border: none; }
    .notif-panel { width: 100%; right: 0; top: 58px; border-radius: 0; }
    .thread-admin { grid-template-columns: 1fr; }
    .thread-admin .btn-ghost { width: auto; }
    .post-tags { flex-wrap: wrap; }
    .user-chip .user-name { display: none; }
    .user-chip .user-role-tag { display: none; }
    .empty-state { padding: 2rem 1rem; margin: 0.5rem; }
    .empty-state-actions { flex-direction: column; }
    .empty-state-actions .btn-primary,
    .empty-state-actions .btn-ghost { width: 100%; justify-content: center; }
    .empty-state-guide { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    /* DM modal — full screen on mobile */
    .dm-modal { width: 100%; max-width: 100dvw; height: 100dvh; max-height: 100dvh; border: none; flex-direction: column; }
    #dm-overlay { align-items: flex-end; }
    .dm-sidebar { width: 100%; max-height: 40dvh; border-right: none; border-bottom: 1px solid var(--border); }
    .dm-main { min-height: 0; flex: 1 1 auto; }
    .dm-messages { max-height: 240px; }
    .dm-conv-preview { max-width: 180px; }

    /* Profile edit modal — full screen on mobile */
    .profile-edit-content { width: 100%; max-width: 100dvw; max-height: 100dvh; border: none; }
    #profile-edit-overlay { align-items: flex-end; }

    /* User profile modal — full screen on mobile */
    #user-profile-overlay { align-items: flex-end; }

    /* Notification panel — full width on mobile */
    .notif-panel { max-height: 70vh; }
    .notif-item { padding: 0.65rem 0.85rem; }
    .notif-text { font-size: 0.78rem; }

    /* Thread modal tweaks */
    .thread-comments { max-height: 180px; }
    .thread-reply textarea { font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .header-inner { padding: 0 0.75rem; }
    .logo-sub { display: none; }
    .icon-btn { width: 30px; height: 30px; }
    .user-chip { padding: 0.25rem 0.5rem 0.25rem 0.25rem; }
    .user-avatar { width: 22px; height: 22px; font-size: 0.6rem; }
    .content { gap: 0.75rem; }
    .panel-body { padding: 0.65rem; }
    .status-badge { font-size: 0.55rem; padding: 1px 5px; }
    .post-footer { flex-wrap: wrap; gap: 0.5rem; }

    /* DM compact */
    .dm-sidebar { max-height: 35vh; }
    .dm-conv-item { padding: 0.5rem 0.65rem; }
    .dm-conv-avatar { width: 28px; height: 28px; font-size: 0.65rem; }
    .dm-msg-bubble { font-size: 0.78rem; padding: 0.4rem 0.55rem; }
    .dm-input-row { padding: 0.5rem; }
    .dm-chat-header { padding: 0.55rem 0.75rem; }

    /* Notif compact */
    .notif-header { padding: 0.65rem 0.85rem; }
    .notif-item { padding: 0.55rem 0.75rem; }
}