/* ========== СЕКЦИЯ ИСТОРИЙ В ПРОФИЛЕ (КОМПАКТНО) ========== */
.profile-stories-section {
    margin: 0;
    padding: 0;
    border: none;
}

.profile-stories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 0;
}

.profile-stories-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.profile-add-story-btn {
    background: var(--primary);
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* GRID: 4 колонки, минимальный gap */
.profile-stories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 0;
}

.profile-story-item {
    cursor: pointer;
    border-radius: 0;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: transform 0.1s;
}

.profile-story-item:hover {
    transform: scale(1.02);
}

.profile-story-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-story-preview img,
.profile-story-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-story-audio-icon,
.profile-story-placeholder {
    font-size: 32px;
    color: #aaa;
}

.profile-story-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.profile-story-item:hover .profile-story-delete {
    opacity: 1;
}

.profile-story-caption {
    font-size: 10px;
    padding: 2px 0;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1.2;
}

.profile-stories-empty {
    text-align: center;
    padding: 16px 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.profile-create-story-btn {
    display: block;
    margin: 8px auto 0;
    background: var(--primary);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 12px;
}

/* ========== КОМПАКТНЫЕ ПОЛЯ В ПРОФИЛЕ (уменьшаем вертикальные отступы) ========== */
.user-profile-body {
    gap: 8px !important;
}

.profile-info-field,
.profile-editable-field {
    padding: 6px 0 !important;
    margin-bottom: 0 !important;
}

.profile-about-section {
    margin-bottom: 8px !important;
}

.profile-stories-section {
    margin-top: 4px !important;
}