/* ============================================================ */
/* FEED — стили для ленты новостей                              */
/* v4 — лёгкий стиль, без тяжёлых эффектов, медиа не обрезаются */
/* ============================================================ */

/* ─── Обрезка длинных постов ─── */
.post-text-content.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.6em * 4);
    position: relative;
}

.post-text-content.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.6em;
    background: linear-gradient(180deg, transparent 0%, rgba(var(--bg-card-rgb), 0.85) 90%);
    pointer-events: none;
}

.post-text-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 0;
    border: none;
    background: none;
    color: var(--primary, #1A73E8);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.15s ease, opacity 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.post-text-toggle:hover { opacity: 0.75; }
.post-text-toggle:active { transform: scale(0.97); }
.post-text-toggle i { font-size: 11px; transition: transform 0.2s ease; }

/* ─── Сетки медиа в постах — на всю ширину поста ─── */
.post-photos-grid,
.post-videos-grid {
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: var(--bg-input);
    width: 100%;
}

/* ─── Карточка поста ─── */
.post-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: visible;
}

.post-card:hover {
    border-color: var(--primary);
}

.post-card .action-btn {
    transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.post-card .action-btn:active {
    animation: btnTap 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.post-card .like-btn.liked {
    animation: likePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.post-card .bookmark-btn.bookmarked {
    animation: bookmarkPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Фильтры ленты (sticky) — без blur ─── */
.feed-filters {
    display: flex;
    width: 100%;
    flex-shrink: 0;
    position: sticky;
    top: 8px;
    z-index: 10;
    background: rgba(var(--bg-card-rgb), 0.96);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 14px;
    padding: 6px;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    box-sizing: border-box;
}

.feed-filters::-webkit-scrollbar { display: none; }

/* ============================================================ */
/* МУЗЫКАЛЬНЫЙ ПЛЕЕР В ПОСТЕ — простая карточка                 */
/* ============================================================ */
.post-music-player {
    margin: 10px 14px;
    padding: 0;
    background: rgba(var(--bg-card-rgb), 0.75);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.25s ease;
}

.post-music-player:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.post-music-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #E91E63, #9C27B0);
    z-index: 2;
}

.post-music-player .pm-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    position: relative;
    z-index: 1;
}

.post-music-player .pm-cover {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.2);
    position: relative;
}

.post-music-player .pm-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-music-player .pm-cover i {
    color: white;
    font-size: 20px;
}

.post-music-player .pm-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-music-player .pm-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.post-music-player .pm-artist {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.post-music-player .pm-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.post-music-player .pm-progress {
    flex: 1;
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.post-music-player .pm-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #E91E63, #9C27B0);
    border-radius: 2px;
    transition: width 0.1s linear;
    position: relative;
}

.post-music-player .pm-time {
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    min-width: 34px;
    text-align: right;
}

.post-music-player .pm-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.4);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
    position: relative;
    overflow: hidden;
}

.post-music-player .pm-play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(233, 30, 99, 0.55);
}

.post-music-player .pm-play-btn:active {
    transform: scale(0.95);
}

.post-music-player .pm-play-btn i {
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.post-music-player .pm-playlist {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 10px;
    border-bottom: 1px solid rgba(233, 30, 99, 0.12);
    margin-bottom: 4px;
}

.post-music-player .pm-playlist-label {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-music-player .pm-playlist-label i {
    color: #E91E63;
}

.post-music-player .pm-playlist-count {
    font-size: 11px;
    font-weight: 600;
    color: #E91E63;
    background: rgba(233, 30, 99, 0.12);
    padding: 2px 10px;
    border-radius: 50px;
    margin-left: auto;
}

.post-music-player .pm-track {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.post-music-player .pm-track:hover {
    background: rgba(233, 30, 99, 0.06);
}

.post-music-player .pm-track.active {
    background: rgba(233, 30, 99, 0.1);
}

.post-music-player .pm-track-cover {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.post-music-player .pm-track-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-music-player .pm-track-cover i {
    color: white;
    font-size: 14px;
}

.post-music-player .pm-track-info {
    flex: 1;
    min-width: 0;
}

.post-music-player .pm-track-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-music-player .pm-track-artist {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-music-player .pm-track-play {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(233, 30, 99, 0.12);
    color: #E91E63;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s, background-color 0.2s, color 0.2s;
    font-size: 12px;
}

.post-music-player .pm-track-play:hover {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: white;
    transform: scale(1.1);
}

.post-music-player audio {
    display: none;
}

/* ============================================================ */
/* РАЗДЕЛ МУЗЫКА — оставляем как было, без изменений            */
/* ============================================================ */

.music-modern {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

.music-search-wrap {
    padding: 12px 14px;
    background: rgba(var(--bg-card-rgb), 0.78);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow), var(--glass-inset);
    margin-bottom: 14px;
    position: relative;
    z-index: 20;
}

.music-search-wrap .search-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(var(--bg-card-rgb), 0.6);
    border-radius: 16px;
    padding: 0 16px;
    border: 2px solid var(--glass-border);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.music-search-wrap .search-input-wrap:focus-within {
    border-color: #E91E63;
    box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.12);
}

.music-search-wrap .search-input-wrap i {
    color: var(--text-muted);
    font-size: 15px;
    margin-right: 10px;
}

.music-search-wrap .search-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 15px;
    color: var(--text);
    outline: none;
    min-width: 0;
    font-family: inherit;
}

.music-search-wrap .search-input-wrap input::placeholder {
    color: var(--text-muted);
}

.music-search-wrap .search-input-wrap .search-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 6px;
    display: none;
    transition: color 0.2s;
}

.music-search-wrap .search-input-wrap .search-clear.show { display: block; }
.music-search-wrap .search-input-wrap .search-clear:hover { color: #E53935; }

.music-search-suggestions {
    position: absolute;
    top: calc(100% - 6px);
    left: 14px;
    right: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.music-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}

.music-suggestion-item:last-child { border-bottom: none; }
.music-suggestion-item:hover { background: var(--bg-input); }

.music-tabs {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: rgba(var(--bg-card-rgb), 0.78);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow), var(--glass-inset);
    margin-bottom: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    position: sticky;
    top: 8px;
    z-index: 10;
}

.music-tabs::-webkit-scrollbar { display: none; }

.music-tabs .tab-btn {
    padding: 10px 16px;
    border-radius: 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s, color 0.25s, box-shadow 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.music-tabs .tab-btn:hover {
    background: var(--glass-bg-light);
    color: var(--text);
}

.music-tabs .tab-btn.active {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: white;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.35);
    transform: translateY(-1px);
}

.music-tabs .tab-btn i { font-size: 13px; }

.music-content {
    padding: 0 0 180px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.music-track-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(var(--bg-card-rgb), 0.78);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow), var(--glass-inset);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s, border-color 0.2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 76px;
}

.music-track-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--glass-shadow-hover), var(--glass-inset);
    border-color: rgba(233, 30, 99, 0.3);
}

.music-track-item:active {
    transform: translateY(-1px) scale(0.995);
}

.music-track-item.is-playing {
    border-color: #E91E63;
    background: rgba(var(--bg-card-rgb), 0.9);
    box-shadow:
        0 0 0 2px rgba(233, 30, 99, 0.15),
        var(--glass-shadow-hover),
        var(--glass-inset);
}

.music-track-item.is-playing::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #E91E63, #9C27B0);
    border-radius: 20px 0 0 20px;
}

.music-track-item .track-thumb,
.music-track-item .track-thumb-large {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 14px rgba(233, 30, 99, 0.25);
    border: 2px solid var(--glass-border);
}

.music-track-item .track-thumb img,
.music-track-item .track-thumb-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.music-track-item:hover .track-thumb img,
.music-track-item:hover .track-thumb-large img {
    transform: scale(1.08);
}

.music-track-item .track-thumb i,
.music-track-item .track-thumb-large i {
    color: white;
    font-size: 22px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.music-track-item.is-playing .track-thumb::after,
.music-track-item.is-playing .track-thumb-large::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(233, 30, 99, 0.25);
    pointer-events: none;
}

.music-track-item.is-playing .track-thumb::before,
.music-track-item.is-playing .track-thumb-large::before {
    content: '\f04b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.music-track-item .offline-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 10px;
    background: linear-gradient(135deg, #34A853, #1E7E34);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(52, 168, 83, 0.4);
}

.music-track-item .track-info,
.music-track-item .track-info-large {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.music-track-item .track-name,
.music-track-item .track-name-large {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

.music-track-item .track-artist,
.music-track-item .track-artist-large {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.music-track-item .track-artist i,
.music-track-item .track-artist-large i {
    font-size: 10px;
    opacity: 0.7;
}

.music-track-item .track-meta {
    display: flex;
    gap: 12px;
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-muted);
}

.music-track-item .track-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.music-track-item .track-actions,
.music-track-item .track-actions-large {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.music-track-item .track-actions button,
.music-track-item .action-btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s, color 0.25s;
    flex-shrink: 0;
}

.music-track-item .track-actions button:hover,
.music-track-item .action-btn-circle:hover {
    background: var(--glass-bg-light);
    transform: scale(1.1);
}

.music-track-item .track-actions .play-btn,
.music-track-item .action-btn-circle.play {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: white;
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.35);
}

.music-track-item .track-actions .play-btn:hover,
.music-track-item .action-btn-circle.play:hover {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(233, 30, 99, 0.5);
}

.music-track-item .track-actions .fav-btn.active,
.music-track-item .action-btn-circle.fav.active {
    color: #F5A623;
    background: rgba(245, 166, 35, 0.12);
}

.music-track-item .track-actions .fav-btn:hover {
    color: #F5A623;
    background: rgba(245, 166, 35, 0.1);
}

.music-track-item .track-actions .add-btn.active,
.music-track-item .action-btn-circle.add.active {
    color: #34A853;
    background: rgba(52, 168, 83, 0.12);
}

.music-track-item .track-actions .add-btn:hover {
    color: #34A853;
    background: rgba(52, 168, 83, 0.1);
}

.music-track-item .track-actions .remove-btn:hover {
    color: #E53935;
    background: rgba(229, 57, 53, 0.1);
}

.music-track-item-large {
    min-height: 88px;
    padding: 14px 18px;
    gap: 16px;
}

.music-track-item-large .track-thumb-large {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.3);
}

.music-track-item-large .track-name-large { font-size: 16px; }
.music-track-item-large .track-artist-large { font-size: 13px; }

.music-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px 12px;
    margin-top: 4px;
}

.music-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.music-section-title > span {
    font-size: 26px !important;
    line-height: 1;
}

.music-section-title > div > div:first-child {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: var(--text) !important;
    letter-spacing: -0.3px;
}

.music-section-title > div > div:last-child {
    font-size: 12px !important;
    color: var(--text-muted) !important;
    margin-top: 2px;
}

.music-section-action {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: rgba(var(--bg-card-rgb), 0.6);
    color: #E91E63;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s, color 0.25s, box-shadow 0.25s;
    flex-shrink: 0;
}

.music-section-action:hover {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: white;
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

.music-section-action.danger {
    color: #E53935;
    border-color: rgba(229, 57, 53, 0.3);
}

.music-section-action.danger:hover {
    background: linear-gradient(135deg, #E53935, #C62828);
    color: white;
}

.music-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    background: rgba(var(--bg-card-rgb), 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
}

.music-empty .empty-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.2;
}

.music-empty .empty-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-secondary);
}

.music-empty .empty-sub {
    font-size: 13px;
    margin-top: 4px;
    opacity: 0.6;
}

.music-player-bar {
    position: fixed;
    bottom: calc(var(--bottom-nav-height, 74px) + var(--safe-bottom, 0px) + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 600px;
    background: rgba(var(--bg-card-rgb), 0.98);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 8px 14px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        var(--glass-inset);
    height: 68px;
    max-height: 68px;
    overflow: hidden;
}

.music-player-bar .mini-progress {
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: rgba(233, 30, 99, 0.12);
    border-radius: 4px;
    overflow: hidden;
}

.music-player-bar .mini-progress .fill {
    height: 100%;
    background: linear-gradient(90deg, #E91E63, #9C27B0);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 4px;
}

.music-player-bar .mini-cover {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    border: 2px solid var(--glass-border);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(233, 30, 99, 0.3);
    transition: transform 0.25s ease;
}

.music-player-bar .mini-cover:hover { transform: scale(1.06); }

.music-player-bar .mini-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.music-player-bar .mini-cover .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.music-player-bar .mini-info {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.music-player-bar .mini-info .mini-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.music-player-bar .mini-info .mini-artist {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.music-player-bar .mini-controls {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-shrink: 0;
}

.music-player-bar .mini-controls button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.music-player-bar .mini-controls button:hover {
    background: var(--glass-bg-light);
    color: var(--text);
}

.music-player-bar .mini-controls .play-btn {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: white;
    width: 44px;
    height: 44px;
    font-size: 17px;
    box-shadow: 0 4px 14px rgba(233, 30, 99, 0.4);
}

.music-player-bar .mini-controls .play-btn:hover {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.5);
}

.music-player-bar .mini-controls .play-btn.playing {
    background: linear-gradient(135deg, #9C27B0, #E91E63);
}

.music-player-bar .mini-fullscreen-btn {
    background: rgba(233, 30, 99, 0.1);
    border: none;
    color: #E91E63;
    cursor: pointer;
    font-size: 15px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}

.music-player-bar .mini-fullscreen-btn:hover {
    background: rgba(233, 30, 99, 0.2);
    transform: scale(1.08);
}

/* ============================================================ */
/* ПУБЛИКАЦИЯ ПОСТА                                             */
/* ============================================================ */

.publish-fab {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 10px 40px rgba(26, 115, 232, 0.5),
        0 4px 16px rgba(0, 0, 0, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.4) inset;
    cursor: pointer;
    font-size: 34px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-fab);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    font-family: inherit;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.publish-fab.visible { display: flex; }

.publish-fab:hover {
    transform: scale(1.12) rotate(90deg);
    box-shadow:
        0 16px 56px rgba(26, 115, 232, 0.6),
        0 6px 20px rgba(0, 0, 0, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.5) inset;
    border-color: rgba(255, 255, 255, 0.4);
}

.publish-fab:active {
    transform: scale(0.95) rotate(0deg);
    transition: transform 0.1s ease;
}

.publish-fab i {
    font-size: 34px;
    transition: transform 0.3s ease;
    color: white;
    pointer-events: none;
    line-height: 1;
}

.publish-fab:hover i { transform: rotate(90deg); }

.publish-modal-overlay {
    background: #000000 !important;
    color: #FFFFFF !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.publish-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    z-index: 10;
}

.publish-header-btn {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-family: inherit;
}

.publish-header-btn:hover { background: rgba(255, 255, 255, 0.1); }

.publish-header-btn.close {
    font-size: 28px;
    width: 44px;
    height: 44px;
}

.publish-header-btn.publish {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: white;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 50px;
    width: auto;
    height: auto;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.4);
}

.publish-header-btn.publish:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(233, 30, 99, 0.6);
}

.publish-header-title {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    text-align: center;
    flex: 1;
    margin: 0 12px;
}

.publish-main-content {
    flex: 1;
    display: flex;
    gap: 16px;
    padding: 20px;
    overflow-y: auto;
    background: #000000;
}

.publish-preview-column {
    flex: 0 0 45%;
    max-width: 45%;
    display: flex;
    flex-direction: column;
}

.publish-preview-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #1A1A1A;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.publish-preview-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.publish-preview-media img,
.publish-preview-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.publish-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    font-weight: 500;
}

.publish-preview-placeholder i { font-size: 48px; }

.publish-preview-edit-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    z-index: 5;
}

.publish-preview-edit-btn:hover { background: rgba(0, 0, 0, 0.8); }
.publish-preview-edit-btn i { font-size: 11px; }

.publish-preview-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
    z-index: 5;
}

.publish-settings-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.publish-settings-block {
    background: #1A1A1A;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.publish-settings-block.clickable {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.publish-settings-block.clickable:hover { background: #2A2A2A; }

.publish-settings-block textarea {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 15px;
    resize: none;
    outline: none;
    width: 100%;
    min-height: 80px;
    padding: 0;
    line-height: 1.5;
}

.publish-settings-block textarea::placeholder { color: rgba(255, 255, 255, 0.4); }

.publish-char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    font-variant-numeric: tabular-nums;
}

.publish-settings-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #FFFFFF;
    flex-shrink: 0;
}

.publish-settings-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.publish-settings-label {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

.publish-settings-value {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.publish-settings-chevron {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.publish-tools-panel {
    background: #1A1A1A;
    border-radius: 20px 20px 0 0;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.publish-tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

.publish-tool-item:hover { background: rgba(255, 255, 255, 0.1); }

.publish-tool-item i:first-child {
    font-size: 18px;
    color: #E91E63;
    width: 24px;
    text-align: center;
}

.publish-tool-chevron {
    margin-left: auto;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
}

.publish-edit-tools {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.publish-edit-tools::-webkit-scrollbar { display: none; }

.publish-edit-tool {
    flex: 1;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
}

.publish-edit-tool:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.publish-edit-tool:active { transform: scale(0.95); }

.publish-edit-tool i {
    font-size: 22px;
    color: #FFFFFF;
    opacity: 0.9;
}

/* Превью-стек */
.publish-preview-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 6px;
    padding: 6px;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.publish-preview-main {
    flex: 1;
    min-height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.publish-preview-main img,
.publish-preview-main video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.publish-preview-thumbs {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    height: 52px;
    justify-content: center;
}

.publish-preview-thumb {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.publish-preview-thumb:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.publish-preview-thumb img,
.publish-preview-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.publish-preview-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 800;
    z-index: 2;
}

/* Суб-модалки публикации */
.publish-sub-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: overlayFade 0.2s ease;
}

@media (min-width: 769px) {
    .publish-sub-modal-overlay { align-items: center; }
}

.publish-sub-modal {
    background: #1A1A1A;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUpMobile 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 769px) {
    .publish-sub-modal { border-radius: 20px; max-height: 70vh; }
}

.publish-sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.publish-sub-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

.publish-sub-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.publish-sub-close:hover {
    background: rgba(229, 57, 53, 0.3);
    transform: rotate(90deg);
}

.publish-sub-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    min-height: 0;
}

.publish-sub-footer {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.publish-sub-btn-secondary,
.publish-sub-btn-primary {
    flex: 1;
    padding: 12px 16px;
    border-radius: 14px;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.publish-sub-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.publish-sub-btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }

.publish-sub-btn-primary {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: white;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.4);
}

.publish-sub-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(233, 30, 99, 0.6);
}

.publish-radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.publish-radio-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(233, 30, 99, 0.3);
}

.publish-radio-item.active {
    background: rgba(233, 30, 99, 0.1);
    border-color: #E91E63;
}

.publish-radio-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #FFFFFF;
    flex-shrink: 0;
}

.publish-radio-item.active .publish-radio-icon {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: white;
}

.publish-radio-info { flex: 1; min-width: 0; }
.publish-radio-title { font-size: 14px; font-weight: 700; color: #FFFFFF; }
.publish-radio-sub { font-size: 12px; color: rgba(255, 255, 255, 0.5); margin-top: 2px; }

.publish-radio-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    flex-shrink: 0;
    transition: all 0.2s;
}

.publish-radio-item.active .publish-radio-check {
    background: #E91E63;
    border-color: #E91E63;
    color: white;
}

.publish-search-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    margin-bottom: 14px;
}

.publish-search-input:focus-within {
    border-color: #E91E63;
    background: rgba(233, 30, 99, 0.06);
}

.publish-search-input i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    flex-shrink: 0;
}

.publish-search-input input {
    flex: 1;
    border: none;
    background: transparent;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    min-width: 0;
}

.publish-search-input input::placeholder { color: rgba(255, 255, 255, 0.4); }

.publish-location-results { display: flex; flex-direction: column; gap: 4px; }

.publish-location-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 14px;
    color: #FFFFFF;
}

.publish-location-item:hover { background: rgba(255, 255, 255, 0.1); }
.publish-location-item i { color: #E91E63; flex-shrink: 0; }

.publish-hashtags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
}

.publish-hashtag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: white;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

.publish-hashtag-chip button {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.2s;
}

.publish-hashtag-chip button:hover { background: rgba(255, 255, 255, 0.4); }

.publish-hashtags-empty {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.publish-toggle-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.publish-toggle-item:hover { background: rgba(255, 255, 255, 0.08); }

.publish-toggle-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #FFFFFF;
    flex-shrink: 0;
}

.publish-toggle-info { flex: 1; min-width: 0; }
.publish-toggle-title { font-size: 14px; font-weight: 700; color: #FFFFFF; }
.publish-toggle-sub { font-size: 12px; color: rgba(255, 255, 255, 0.5); margin-top: 2px; }

.publish-toggle-switch {
    width: 48px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.3s;
}

.publish-toggle-switch.active { background: linear-gradient(135deg, #E91E63, #9C27B0); }

.publish-toggle-dot {
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.publish-toggle-switch.active .publish-toggle-dot { left: 23px; }

/* Музыка в публикации */
.publish-music-tabs {
    display: flex;
    gap: 6px;
    padding: 12px 16px 0;
    flex-shrink: 0;
}

.pm-tab {
    flex: 1;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pm-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.pm-tab.active {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.4);
}

.publish-music-empty {
    text-align: center;
    padding: 32px 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.publish-music-empty i {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.3;
}

.publish-music-empty span { display: block; font-weight: 600; }

.publish-music-upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s;
    margin-top: 12px;
}

.publish-music-upload-zone:hover {
    border-color: #E91E63;
    background: rgba(233, 30, 99, 0.06);
}

.publish-music-upload-zone i {
    font-size: 40px;
    color: #E91E63;
    display: block;
    margin-bottom: 10px;
}

.publish-music-upload-title {
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.publish-music-upload-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.pm-selected-track {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(233, 30, 99, 0.06);
    border: 1px solid rgba(233, 30, 99, 0.2);
    border-radius: 12px;
    margin-bottom: 6px;
}

.pm-selected-cover {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 15px;
}

.pm-selected-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-selected-info { flex: 1; min-width: 0; }

.pm-selected-title {
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-selected-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-selected-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(229, 57, 53, 0.15);
    color: #E53935;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.pm-selected-remove:hover { background: rgba(229, 57, 53, 0.3); }

/* Опрос */
.poll-field { margin-bottom: 16px; }

.poll-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.poll-input,
.poll-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s;
}

.poll-input:focus,
.poll-select:focus {
    border-color: #FF6B00;
    background: rgba(255, 107, 0, 0.06);
}

.poll-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.poll-select option { background: #1A1A1A; color: #FFFFFF; }

.poll-type-row { display: flex; gap: 8px; }

.poll-type-btn {
    flex: 1;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.poll-type-btn.active {
    border-color: #FF6B00;
    background: rgba(255, 107, 0, 0.1);
    color: #FF6B00;
}

.poll-option-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.poll-option-num {
    width: 28px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    flex-shrink: 0;
}

.poll-option-input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s;
}

.poll-option-input:focus {
    border-color: #FF6B00;
    background: rgba(255, 107, 0, 0.06);
}

.poll-option-input::placeholder { color: rgba(255, 255, 255, 0.35); }

.poll-option-remove {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(229, 57, 53, 0.12);
    color: #E53935;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.poll-option-remove:hover { background: rgba(229, 57, 53, 0.25); }

.poll-add-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: all 0.2s;
}

.poll-add-btn:hover {
    border-color: #FF6B00;
    color: #FF6B00;
    background: rgba(255, 107, 0, 0.05);
}

.poll-checkboxes { display: flex; gap: 16px; flex-wrap: wrap; }

.poll-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.poll-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #FF6B00;
    cursor: pointer;
}

.poll-upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s;
    margin-bottom: 12px;
}

.poll-upload-zone:hover {
    border-color: #FF6B00;
    background: rgba(255, 107, 0, 0.05);
}

.poll-upload-zone i {
    font-size: 36px;
    color: #FF6B00;
    display: block;
    margin-bottom: 8px;
}

.poll-upload-title {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.poll-upload-sub { font-size: 12px; color: rgba(255, 255, 255, 0.4); }

.poll-images-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.poll-images-grid > div {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.poll-images-grid > div img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.publish-more-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 16px 0;
}

.publish-more-section-title {
    font-size: 12px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================ */
/* ИСТОРИИ                                                      */
/* ============================================================ */

.stories-container {
    transition:
        max-height 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.25s ease,
        margin 0.35s ease,
        padding 0.35s ease,
        transform 0.3s ease;
    gap: 20px;
    padding: 20px 0 20px 8px;
    margin-bottom: 16px;
}

.stories-container.stories-hidden {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    transform: translateY(-8px);
}

.story-circle {
    width: 100px;
    gap: 8px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    flex-shrink: 0;
}

.story-circle > div:first-child {
    width: 92px;
    height: 92px;
    padding: 5px;
    border-radius: 50%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-circle > div:first-child > div {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-card);
    border-width: 4px;
    border-style: solid;
    border-color: var(--primary);
}

.story-circle > div:first-child img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.story-circle span {
    font-size: 14px;
    max-width: 92px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-circle:hover {
    transform: translateY(-2px);
}

.story-circle:active { transform: scale(0.95); }

.story-circle.add-story > div:first-child {
    width: 92px;
    height: 92px;
    font-size: 38px;
    background: var(--bg-input);
    border: 2px dashed var(--primary);
    color: var(--primary);
}

.story-circle.add-story:hover > div:first-child {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px var(--bg-card), 0 8px 32px var(--primary-glow);
}

.story-circle .own-badge {
    width: 28px;
    height: 28px;
    font-size: 12px;
    top: -4px;
    right: -4px;
    border-width: 3px;
    position: absolute;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-card);
}

/* ─── Просмотр историй ─── */
#storyViewer {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #000;
    z-index: 9999999;
    display: none;
    flex-direction: column;
}

#storyViewer.active { display: flex; }

#storyViewer video,
#storyViewer img {
    transition: opacity 0.3s ease;
}

#storyViewer video { cursor: pointer; }

#storyViewer .story-progress-bar {
    transition: width 0.1s linear;
}

#storyViewer .story-nav-btn {
    user-select: none;
    -webkit-user-select: none;
}

/* ============================================================ */
/* АДАПТИВ                                                      */
/* ============================================================ */

@media (max-width: 768px) {
    .publish-fab {
        bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 20px);
        width: 68px;
        height: 68px;
        font-size: 30px;
        right: 16px;
        border-width: 2px;
        box-shadow:
            0 10px 36px rgba(26, 115, 232, 0.55),
            0 4px 14px rgba(0, 0, 0, 0.18),
            0 1px 0 rgba(255, 255, 255, 0.45) inset;
    }
    .publish-fab i { font-size: 30px; }

    .publish-header {
        padding: 12px 16px;
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
    }
    .publish-header-title { font-size: 16px; }
    .publish-header-btn.close { font-size: 24px; width: 40px; height: 40px; }
    .publish-header-btn.publish { padding: 8px 18px; font-size: 13px; }
    .publish-main-content {
        flex-direction: row;
        padding: 10px;
        gap: 10px;
    }
    .publish-preview-column { flex: 0 0 42%; max-width: 42%; }
    .publish-preview-wrapper { aspect-ratio: 9 / 14; border-radius: 12px; }
    .publish-preview-edit-btn { padding: 6px 10px; font-size: 10px; top: 8px; left: 8px; }
    .publish-preview-duration { font-size: 10px; padding: 3px 8px; bottom: 8px; right: 8px; }
    .publish-settings-column { flex: 1; gap: 6px; }
    .publish-settings-block { padding: 10px 12px; border-radius: 12px; gap: 6px; }
    .publish-settings-block textarea { min-height: 70px; font-size: 13px; }
    .publish-settings-label { font-size: 12px; }
    .publish-settings-value { font-size: 10px; }
    .publish-settings-icon { width: 26px; height: 26px; font-size: 12px; border-radius: 8px; }
    .publish-settings-chevron { font-size: 12px; }
    .publish-char-counter { font-size: 10px; bottom: 6px; right: 10px; }
    .publish-tools-panel {
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        gap: 10px;
        border-radius: 16px 16px 0 0;
    }
    .publish-tool-item { padding: 10px 12px; font-size: 12px; border-radius: 12px; }
    .publish-tool-item i:first-child { font-size: 15px; width: 20px; }
    .publish-edit-tools { gap: 6px; }
    .publish-edit-tool {
        min-width: 60px;
        padding: 10px 6px;
        font-size: 9px;
        border-radius: 12px;
        gap: 5px;
    }
    .publish-edit-tool i { font-size: 18px; }

    .publish-preview-thumbs { height: 42px; gap: 3px; }
    .publish-preview-thumb { width: 42px; height: 42px; border-radius: 6px; }
    .publish-preview-thumb-overlay { font-size: 12px; }
    .publish-preview-stack { gap: 4px; padding: 4px; }
    .publish-preview-main { border-radius: 10px; }

    .music-track-item {
        padding: 10px 14px;
        min-height: 72px;
        gap: 12px;
        border-radius: 18px;
    }
    .music-track-item .track-thumb,
    .music-track-item .track-thumb-large { width: 56px; height: 56px; border-radius: 13px; }
    .music-track-item .track-name,
    .music-track-item .track-name-large { font-size: 14px; }
    .music-track-item .track-artist,
    .music-track-item .track-artist-large { font-size: 11px; }
    .music-track-item .track-actions button,
    .music-track-item .action-btn-circle { width: 38px; height: 38px; font-size: 14px; }
    .music-track-item .track-actions .play-btn,
    .music-track-item .action-btn-circle.play { width: 42px; height: 42px; font-size: 15px; }

    .music-player-bar { height: 62px; padding: 6px 12px; gap: 10px; }
    .music-player-bar .mini-cover { width: 42px; height: 42px; border-radius: 11px; }
    .music-player-bar .mini-info .mini-title { font-size: 13px; }
    .music-player-bar .mini-info .mini-artist { font-size: 11px; }
    .music-player-bar .mini-controls button { width: 34px; height: 34px; font-size: 13px; }
    .music-player-bar .mini-controls .play-btn { width: 40px; height: 40px; font-size: 15px; }

    .stories-container { transition-duration: 0.3s; }
}

@media (max-width: 480px) {
    .publish-fab {
        width: 62px;
        height: 62px;
        font-size: 28px;
        bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 14px);
        right: 14px;
        border-width: 2px;
        box-shadow:
            0 10px 32px rgba(26, 115, 232, 0.55),
            0 4px 12px rgba(0, 0, 0, 0.18),
            0 1px 0 rgba(255, 255, 255, 0.45) inset;
    }
    .publish-fab i { font-size: 28px; }

    .publish-header {
        padding: 10px 12px;
        padding-top: calc(10px + env(safe-area-inset-top, 0px));
    }
    .publish-header-title { font-size: 15px; }
    .publish-header-btn.publish { padding: 7px 14px; font-size: 12px; }
    .publish-main-content { padding: 8px; gap: 8px; }
    .publish-preview-column { flex: 0 0 40%; max-width: 40%; }
    .publish-preview-wrapper { aspect-ratio: 9 / 15; border-radius: 10px; }
    .publish-preview-edit-btn { padding: 5px 8px; font-size: 9px; top: 6px; left: 6px; gap: 4px; }
    .publish-preview-edit-btn i { font-size: 9px; }
    .publish-settings-block { padding: 8px 10px; border-radius: 10px; gap: 4px; }
    .publish-settings-block textarea { min-height: 60px; font-size: 12px; }
    .publish-settings-label { font-size: 11px; }
    .publish-settings-icon { width: 24px; height: 24px; font-size: 11px; border-radius: 7px; }
    .publish-tools-panel {
        padding: 8px 10px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        gap: 8px;
    }
    .publish-tool-item { padding: 8px 10px; font-size: 11px; }
    .publish-edit-tool { min-width: 55px; padding: 8px 5px; font-size: 9px; }
    .publish-edit-tool i { font-size: 16px; }

    .publish-preview-thumbs { height: 36px; gap: 2px; }
    .publish-preview-thumb { width: 36px; height: 36px; border-radius: 5px; }
    .publish-preview-thumb-overlay { font-size: 10px; }
    .publish-preview-stack { gap: 3px; padding: 3px; }
    .publish-preview-main { border-radius: 8px; }

    .music-track-item {
        padding: 8px 12px;
        min-height: 68px;
        gap: 10px;
        border-radius: 16px;
    }
    .music-track-item .track-thumb,
    .music-track-item .track-thumb-large { width: 50px; height: 50px; border-radius: 12px; }
    .music-track-item .track-name,
    .music-track-item .track-name-large { font-size: 13px; }
    .music-track-item .track-actions button,
    .music-track-item .action-btn-circle { width: 34px; height: 34px; font-size: 13px; }
    .music-track-item .track-actions .play-btn,
    .music-track-item .action-btn-circle.play { width: 38px; height: 38px; font-size: 14px; }
    .music-tabs .tab-btn { padding: 8px 12px; font-size: 12px; }
    .music-player-bar { height: 58px; padding: 6px 10px; gap: 8px; }
    .music-player-bar .mini-cover { width: 38px; height: 38px; border-radius: 10px; }
    .music-player-bar .mini-controls button { width: 32px; height: 32px; font-size: 12px; }
    .music-player-bar .mini-controls .play-btn { width: 38px; height: 38px; font-size: 14px; }
}

/* ============================================================ */
/* ВИРТУАЛИЗАЦИЯ ЛЕНТЫ                                          */
/* ============================================================ */

.feed-posts-wrapper[data-feed-list="1"] {
    position: relative;
    width: 100%;
}

.feed-posts-wrapper[data-feed-list="1"] > .post-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.feed-posts-wrapper[data-feed-list="1"] > .empty-state,
.feed-posts-wrapper[data-feed-list="1"] > .new-posts-indicator {
    position: relative;
    transform: none !important;
}

/* ============================================================ */
/* ФИКС МЕДИА: не обрезается, как в соцсетях                     */
/* ============================================================ */

.post-card {
    overflow: visible;
}

.post-photos-grid,
.post-videos-grid {
    overflow: hidden;
    border-radius: 0;
}

.post-photos-grid .post-media-item,
.post-videos-grid .post-media-item {
    overflow: hidden;
    background: var(--bg-input);
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.post-photos-grid .post-media-item img,
.post-photos-grid .post-media-item video,
.post-videos-grid .post-media-item img,
.post-videos-grid .post-media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Одиночное медиа — contain, не обрезается */
.post-photos-grid:has(> .post-media-item:only-child) .post-media-item,
.post-videos-grid:has(> .post-media-item:only-child) .post-media-item {
    max-height: 600px;
    aspect-ratio: auto;
}

.post-photos-grid:has(> .post-media-item:only-child) .post-media-item img,
.post-photos-grid:has(> .post-media-item:only-child) .post-media-item video,
.post-videos-grid:has(> .post-media-item:only-child) .post-media-item img,
.post-videos-grid:has(> .post-media-item:only-child) .post-media-item video {
    object-fit: contain;
    max-height: 600px;
    width: 100%;
    background: #000;
}